MCPcopy Create free account
hub / github.com/LASzip/LASzip / realloc_las

Function realloc_las

src/mydefs.cpp:581–591  ·  view source on GitHub ↗

extension of the realloc function to check memory allocation errors

Source from the content-addressed store, hash-verified

579
580/// extension of the realloc function to check memory allocation errors
581void* realloc_las(void* ptr, size_t size) {
582 bool warning = check_available_RAM(size);
583
584 void* temp = realloc(ptr, size);
585 if (!temp && !warning) {
586 LASMessage(LAS_WARNING, "memory reallocation failed");
587 return ptr;
588 } else {
589 return temp;
590 }
591}
592
593/// extension of the malloc function to check memory allocation errors
594void* malloc_las(size_t size) {

Callers 10

putByteMethod · 0.85
putBytesMethod · 0.85
readMethod · 0.85
laszip_read_headerFunction · 0.85
add_chunk_to_tableMethod · 0.85
manage_cellMethod · 0.85
add_attributeFunction · 0.85
remove_attributeFunction · 0.85

Calls 2

check_available_RAMFunction · 0.85
LASMessageFunction · 0.85

Tested by 2

putByteMethod · 0.68
putBytesMethod · 0.68