diff options
Diffstat (limited to 'Objects/obmalloc.c')
-rw-r--r-- | Objects/obmalloc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index c1c12797aba..903ca1c9e4b 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -552,6 +552,18 @@ PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator) *allocator = _PyObject_Arena; } +void * +_PyObject_VirtualAlloc(size_t size) +{ + return _PyObject_Arena.alloc(_PyObject_Arena.ctx, size); +} + +void +_PyObject_VirtualFree(void *obj, size_t size) +{ + _PyObject_Arena.free(_PyObject_Arena.ctx, obj, size); +} + void PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator) { @@ -3035,7 +3047,7 @@ _PyObject_DebugMallocStats(FILE *out) fputc('\n', out); - /* Account for what all of those arena bytes are being used for. */ + /* Account for what all of those arena bytes are being used for. */ total = printone(out, "# bytes in allocated blocks", allocated_bytes); total += printone(out, "# bytes in available blocks", available_bytes); |