pike.git/
src/
block_alloc.h
Branch:
Tag:
Non-build tags
All tags
No tags
2002-11-24
2002-11-24 20:31:23 by Martin Stjernholm <mast@lysator.liu.se>
99b5ff80c478bd130cc7f16dbd92bf546f4e51da (
10
lines) (+
8
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Added BLOCK_HEADER_SIZE.
Rev: src/block_alloc.h:1.53
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: block_alloc.h,v 1.
52
2002/11/
23
17
:
03
:
00
mast Exp $
+
|| $Id: block_alloc.h,v 1.
53
2002/11/
24
20
:
31
:
23
mast Exp $
*/ #undef PRE_INIT_BLOCK
38:
#define BA_INLINE #endif
+
/* Size of the members in the block struct below that doesn't contain
+
* the payload data (i.e. that aren't x). This can be used in
+
* BSIZE to make the block fit within a page. */
+
#define BLOCK_HEADER_SIZE (3 * sizeof (void *) + sizeof (INT32))
+
#define BLOCK_ALLOC(DATA,BSIZE) \ \ struct PIKE_CONCAT(DATA,_block) \
251:
DO_IF_DMALLOC( \ for(tmp=PIKE_CONCAT(DATA,_blocks);tmp;tmp=tmp->next) \ { \
-
int
tmp2;
\
+
size_t
tmp2; \
extern void dmalloc_check_block_free(void *p, char *loc); \ for(tmp2=0;tmp2<(BSIZE);tmp2++) \ { \