diff options
author | Sergey Kandaurov <pluknet@FreeBSD.org> | 2011-08-01 09:43:35 +0000 |
---|---|---|
committer | Sergey Kandaurov <pluknet@FreeBSD.org> | 2011-08-01 09:43:35 +0000 |
commit | 1882360b9b0fbd7f4ddcd6fb35674ec309b2a738 (patch) | |
tree | 829890d9bb95a570210dfefdba99b9b908745a9d /lib/libmemstat/memstat.h | |
parent | 4d066e45193575e1a4be55cd930cd612a07d9039 (diff) |
Get rid of MAXCPU knowledge used for internal needs only. Switch to
dynamic memory allocation to hold per-CPU memory types data (sized to
mp_maxid for UMA, and to mp_maxcpus for malloc to match the kernel).
That fixes libmemstat with arbitrary large MAXCPU values and therefore
eliminates MEMSTAT_ERROR_TOOMANYCPUS error type.
Reviewed by: jhb
Approved by: re (kib)
Notes
Notes:
svn path=/head/; revision=224569
Diffstat (limited to 'lib/libmemstat/memstat.h')
-rw-r--r-- | lib/libmemstat/memstat.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/libmemstat/memstat.h b/lib/libmemstat/memstat.h index e973f1a52db4..cca75b32092d 100644 --- a/lib/libmemstat/memstat.h +++ b/lib/libmemstat/memstat.h @@ -30,12 +30,6 @@ #define _MEMSTAT_H_ /* - * Number of CPU slots in library-internal data structures. This should be - * at least the value of MAXCPU from param.h. - */ -#define MEMSTAT_MAXCPU 32 - -/* * 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 @@ -70,7 +64,6 @@ #define MEMSTAT_ERROR_NOMEMORY 1 /* Out of memory. */ #define MEMSTAT_ERROR_VERSION 2 /* Unsupported version. */ #define MEMSTAT_ERROR_PERMISSION 3 /* Permission denied. */ -#define MEMSTAT_ERROR_TOOMANYCPUS 4 /* Too many CPUs. */ #define MEMSTAT_ERROR_DATAERROR 5 /* Error in stat data. */ #define MEMSTAT_ERROR_KVM 6 /* See kvm_geterr() for err. */ #define MEMSTAT_ERROR_KVM_NOSYMBOL 7 /* Symbol not available. */ |