Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
886a8e82
Commit
886a8e82
authored
21 years ago
by
Martin Stjernholm
Browse files
Options
Downloads
Patches
Plain Diff
Added DMALLOC_DESCRIBE_BLOCK to allow better descriptions of unfreed blocks.
Rev: src/block_alloc.h:1.70
parent
fbacc23e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/block_alloc.h
+14
-3
14 additions, 3 deletions
src/block_alloc.h
with
14 additions
and
3 deletions
src/block_alloc.h
+
14
−
3
View file @
886a8e82
...
...
@@ -2,7 +2,7 @@
|| 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.
69
2004/04/03 15:
22:12
mast Exp $
|| $Id: block_alloc.h,v 1.
70
2004/04/03 15:
45:41
mast Exp $
*/
#undef PRE_INIT_BLOCK
...
...
@@ -15,6 +15,7 @@
#undef PTR_HASH_ALLOC
#undef COUNT_BLOCK
#undef COUNT_OTHER
#undef DMALLOC_DESCRIBE_BLOCK
#undef BLOCK_ALLOC_HSIZE_SHIFT
#undef MAX_EMPTY_BLOCKS
#undef BLOCK_ALLOC_FILL_PAGES
...
...
@@ -27,6 +28,7 @@
#define EXIT_BLOCK(X)
#define COUNT_BLOCK(X)
#define COUNT_OTHER()
#define DMALLOC_DESCRIBE_BLOCK(X)
#define BLOCK_ALLOC_HSIZE_SHIFT 2
#define MAX_EMPTY_BLOCKS 4
...
...
@@ -192,6 +194,11 @@ static void PIKE_CONCAT(check_free_,DATA)(struct DATA *d) \
} \
Pike_fatal("really_free_%s called on non-block_alloc region (%p).\n", \
#DATA, d); \
} \
\
static void PIKE_CONCAT (dmalloc_describe_, DATA) (struct DATA *d) \
{ \
DMALLOC_DESCRIBE_BLOCK (d); \
} \
) \
\
...
...
@@ -272,7 +279,9 @@ void PIKE_CONCAT(really_free_,DATA)(struct DATA *d) \
DO_IF_DMALLOC({ \
size_t i; \
for (i = 0; i < (BSIZE); i++) { \
dmalloc_check_block_free(blk->x + i, DMALLOC_LOCATION()); \
dmalloc_check_block_free( \
blk->x + i, DMALLOC_LOCATION(), \
(describe_block_fn *) PIKE_CONCAT (dmalloc_describe_, DATA)); \
dmalloc_unregister(blk->x + i, 1); \
} \
}); \
...
...
@@ -296,7 +305,9 @@ static void PIKE_CONCAT3(free_all_,DATA,_blocks_unlocked)(void) \
size_t tmp2; \
for(tmp2=0;tmp2<(BSIZE);tmp2++) \
{ \
dmalloc_check_block_free(tmp->x+tmp2, DMALLOC_LOCATION()); \
dmalloc_check_block_free( \
tmp->x+tmp2, DMALLOC_LOCATION(), \
(describe_block_fn *) PIKE_CONCAT (dmalloc_describe_, DATA)); \
dmalloc_unregister(tmp->x+tmp2, 1); \
} \
} \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment