diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-07-15 11:19:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-07-15 11:19:55 +0000 |
commit | 3aa76a5f8581f6ffda31a88e80f453eef945eeb7 (patch) | |
tree | dcdacbd169690dcd75bb4176a5396c7dbfc3f624 /lib/libmemstat/memstat.h | |
parent | 7da3a4e78f0d8fd5b4d0c29f6063cd8c292f0587 (diff) | |
download | FreeBSD-src-3aa76a5f8581f6ffda31a88e80f453eef945eeb7.zip FreeBSD-src-3aa76a5f8581f6ffda31a88e80f453eef945eeb7.tar.gz |
Increase the number of caller memory storage slots from 2 or 4 to
MEMSTAT_MAXCALLER (8), and expose MEMSTAT_MAXCALLER via memstat.h so
that applications can check their assumptions about how many slots
are available.
Remove 'spare' memory storage in struct malloc_type, since we now
don't expose the data structure internals to applications and rely
on accessor methods, this approach to ABI stability isn't required.
MFC after: 7 days
Diffstat (limited to 'lib/libmemstat/memstat.h')
-rw-r--r-- | lib/libmemstat/memstat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libmemstat/memstat.h b/lib/libmemstat/memstat.h index 847719c..5269a33 100644 --- a/lib/libmemstat/memstat.h +++ b/lib/libmemstat/memstat.h @@ -36,6 +36,14 @@ #define MEMSTAT_MAXCPU 16 /* + * Amount of caller data to maintain for each caller data slot. Applications + * must not request more than this number of caller save data, or risk + * corrupting internal libmemstat(3) data structures. A compile time check + * in the application is probably appropriate. + */ +#define MEMSTAT_MAXCALLER 8 + +/* * libmemstat(3) is able to extract memory data from different allocators; * when it does so, it tags which allocator it got the data from so that * consumers can determine which fields are usable, as data returned varies |