aboutsummaryrefslogtreecommitdiffstats
path: root/vespamalloc/src/vespamalloc/malloc/vespamalloc.h
blob: 4dbadf8a26ee8b7749fc3c0c3973a1f7e6df1df9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

/**
 * Contains the interfaces that vespamalloc offers in addition to the standard
 * allocation interfaces like malloc, calloc, free, new, delete, etc.
 * Use dlsym(RTLD_NEXT, "function_name") to ensure the existence of the interface.
 **/

extern "C" {

/**
 * Reports the amount of memory vespamalloc uses. It is actually the size of the datasegment.
 * This is the peak memory usage during process lifetime, and does not differentiate between malloced or freed memory.
 * This is cheap to call
 **/
unsigned long vespamalloc_datasegment_size();

}