| 59 | } |
| 60 | |
| 61 | void USMHeap::realloc(size_t newByteSize) |
| 62 | { |
| 63 | if (newByteSize == byteSize) |
| 64 | return; |
| 65 | |
| 66 | preRealloc(); |
| 67 | |
| 68 | engine->usmFree(ptr, storage); |
| 69 | ptr = static_cast<char*>(engine->usmAlloc(newByteSize, storage)); |
| 70 | byteSize = newByteSize; |
| 71 | |
| 72 | postRealloc(); |
| 73 | } |
| 74 | |
| 75 | OIDN_NAMESPACE_END |