Currently we implement realloc by simply allocating a new array and copy the contents over. At some point, we probably would like to know how much overhead this would introduce. Alternatively, we may add a realloc method for MMTk allocators. The default implementation is the same allocation and mem copying, but for some allocators, they may provide a more efficient implementation.
Currently we implement
reallocby simply allocating a new array and copy the contents over. At some point, we probably would like to know how much overhead this would introduce. Alternatively, we may add areallocmethod for MMTk allocators. The default implementation is the same allocation and mem copying, but for some allocators, they may provide a more efficient implementation.