MCPcopy Create free account
hub / github.com/LAStools/LAStools / malloc_las

Function malloc_las

LASzip/src/mydefs.cpp:590–598  ·  view source on GitHub ↗

extension of the malloc function to check memory allocation errors

Source from the content-addressed store, hash-verified

588
589/// extension of the malloc function to check memory allocation errors
590void* malloc_las(size_t size) {
591 bool warning = check_available_RAM(size);
592
593 void* ptr = malloc(size);
594 if (!ptr && !warning) {
595 LASMessage(LAS_WARNING, "memory allocation failed");
596 }
597 return ptr;
598}
599
600/// Wrapper for `vsscanf`
601int sscanf_las(const char* buffer, const char* format, ...) {

Callers 15

mainFunction · 0.85
OctantInMemoryMethod · 0.85
swapMethod · 0.85
OctantOnDiskMethod · 0.85
insertMethod · 0.85
swapMethod · 0.85
loadMethod · 0.85
mainFunction · 0.85
GeoTiffInfoMethod · 0.85

Calls 2

check_available_RAMFunction · 0.85
LASMessageFunction · 0.85

Tested by 1

ByteStreamOutArrayMethod · 0.68