Improve computation of number of elements per mempool

so that we don't go above 16K, and lost a complete
page just for 8 bytes!
This commit is contained in:
Patrick Pelissier committed 2017-04-08 20:57:34 +02:00
1 parent 45d2b6cea5
commit 1898e7e793
1 file changed
+1 -1
+1 -1
View File
@@ -134,6 +134,6 @@
/********************************** INTERNAL ************************************/
#define MEMPOOLI_MAX_PER_SEGMENT(type) M_MAX(16*1024 / sizeof (type), 256U)
#define MEMPOOLI_MAX_PER_SEGMENT(type) M_MAX((16*1024-sizeof(unsigned int) - 2*sizeof(void*)) / sizeof (type), 256U)
#endif