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

Function malloc_las

src/mydefs.cpp:594–602  ·  view source on GitHub ↗

extension of the malloc function to check memory allocation errors

Source from the content-addressed store, hash-verified

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

Callers 12

ByteStreamOutArrayMethod · 0.85
ArithmeticEncoderMethod · 0.85
read_chunk_tableMethod · 0.85
laszip_read_headerFunction · 0.85
add_chunk_to_tableMethod · 0.85
manage_cellMethod · 0.85
init_attributesFunction · 0.85
add_attributeFunction · 0.85
IntegerCompressorMethod · 0.85

Calls 2

check_available_RAMFunction · 0.85
LASMessageFunction · 0.85

Tested by 1

ByteStreamOutArrayMethod · 0.68