Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Functions | Variables
malloc.h File Reference
#include <inttypes.h>
#include <stddef.h>

Go to the source code of this file.

Functions

void GetMallocMapinfo (void *addr, int *fd, int64_t *map_length, ptrdiff_t *offset)
 
int64_t GetMmapSize (int fd)
 Get the mmap size corresponding to a specific file descriptor. More...
 
void SetMallocGranularity (int value)
 

Variables

constexpr int64_t kMmapRegionsGap = sizeof(size_t)
 Gap between two consecutive mmap regions allocated by fake_mmap. More...
 

Function Documentation

◆ GetMallocMapinfo()

void GetMallocMapinfo ( void *  addr,
int *  fd,
int64_t *  map_length,
ptrdiff_t *  offset 
)

◆ GetMmapSize()

int64_t GetMmapSize ( int  fd)

Get the mmap size corresponding to a specific file descriptor.

Parameters
fdThe file descriptor to look up.
Returns
The size of the corresponding memory-mapped file.

◆ SetMallocGranularity()

void SetMallocGranularity ( int  value)

Variable Documentation

◆ kMmapRegionsGap

constexpr int64_t kMmapRegionsGap = sizeof(size_t)

Gap between two consecutive mmap regions allocated by fake_mmap.

This ensures that the segments of memory returned by fake_mmap are never contiguous and dlmalloc does not coalesce it (in the client we cannot guarantee that these mmaps are contiguous).