globalmapper.malloc_void¶
- globalmapper.malloc_void(uint32 nbytes) int [source]¶
Allocates nbytes worth of memory for use in the same way as calling malloc() in C/C++. The returned integer is a pointer to the start of the memory that was allocated. Any memory allocated this way needs to be freed with free_void after it is done being used. Since Python manages its memory usage automatically, this function should generally only be used for other SDK functions which require a memory buffer as a parameter (e.g. DrawLayerListToMemory. This function is likely to become deprecated in a future release.
- Parameters:
nbytes (uint32) – The amount of memory to allocate, measured in bytes
- Returns:
The address of the start of the allocated space in memory
- Return type:
int