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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
bd29778e
Commit
bd29778e
authored
Oct 27, 2002
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
More readable
Rev: src/dmalloc.h:1.39
parent
81392d67
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/dmalloc.h
+11
-8
11 additions, 8 deletions
src/dmalloc.h
with
11 additions
and
8 deletions
src/dmalloc.h
+
11
−
8
View file @
bd29778e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
|| for more information.
|| $Id: dmalloc.h,v 1.3
8
2002/10/
11 01:39:30
nilsson Exp $
|| $Id: dmalloc.h,v 1.3
9
2002/10/
27 15:48:18
nilsson Exp $
*/
*/
PMOD_EXPORT
extern
void
*
debug_xalloc
(
size_t
);
PMOD_EXPORT
extern
void
*
debug_xalloc
(
size_t
);
...
@@ -21,7 +21,7 @@ extern size_t dmalloc_tracelogptr;
...
@@ -21,7 +21,7 @@ extern size_t dmalloc_tracelogptr;
#define DMALLOC_TRACE_LOG(X) (dmalloc_tracelog[ dmalloc_tracelogptr = (dmalloc_tracelogptr +1 )%DMALLOC_TRACELOGSIZE ] = (X))
#define DMALLOC_TRACE_LOG(X) (dmalloc_tracelog[ dmalloc_tracelogptr = (dmalloc_tracelogptr +1 )%DMALLOC_TRACELOGSIZE ] = (X))
#endif
#endif
/* DMALLOC_TRACE */
#ifdef DEBUG_MALLOC
#ifdef DEBUG_MALLOC
struct
memhdr
;
struct
memhdr
;
...
@@ -106,7 +106,8 @@ void dmalloc_add_mmap_entry(struct memory_map *m,
...
@@ -106,7 +106,8 @@ void dmalloc_add_mmap_entry(struct memory_map *m,
int
dmalloc_is_invalid_memory_block
(
void
*
block
);
int
dmalloc_is_invalid_memory_block
(
void
*
block
);
#else
#else
/* DEBUG_MALLOC */
#define dmalloc_touch_fd(X) (X)
#define dmalloc_touch_fd(X) (X)
#define dmalloc_register_fd(X) (X)
#define dmalloc_register_fd(X) (X)
#define dmalloc_close_fd(X) (X)
#define dmalloc_close_fd(X) (X)
...
@@ -118,17 +119,19 @@ int dmalloc_is_invalid_memory_block(void *block);
...
@@ -118,17 +119,19 @@ int dmalloc_is_invalid_memory_block(void *block);
#define debug_malloc_dump_references(X,x,y,z)
#define debug_malloc_dump_references(X,x,y,z)
#define debug_malloc_dump_fd(fd)
#define debug_malloc_dump_fd(fd)
#define xalloc debug_xalloc
#define xalloc debug_xalloc
#if defined(DYNAMIC_MODULE) && defined(__NT__)
#if defined(DYNAMIC_MODULE) && defined(__NT__)
#define xmalloc debug_xmalloc
#define xmalloc debug_xmalloc
#define xcalloc debug_xcalloc
#define xcalloc debug_xcalloc
#define xrealloc debug_xrealloc
#define xrealloc debug_xrealloc
#define xfree debug_xfree
#define xfree debug_xfree
#else
#else
/* defined(DYNAMIC_MODULE) && defined(__NT__) */
#define xmalloc malloc
#define xmalloc malloc
#define xcalloc calloc
#define xcalloc calloc
#define xrealloc realloc
#define xrealloc realloc
#define xfree free
#define xfree free
#endif
#endif
/* !(defined(DYNAMIC_MODULE) && defined(__NT__)) */
#define dbm_main main
#define dbm_main main
#define DO_IF_DMALLOC(X)
#define DO_IF_DMALLOC(X)
#define dmalloc_register(X,Y,Z)
#define dmalloc_register(X,Y,Z)
...
@@ -146,12 +149,12 @@ int dmalloc_is_invalid_memory_block(void *block);
...
@@ -146,12 +149,12 @@ int dmalloc_is_invalid_memory_block(void *block);
#define debug_malloc_touch(X) DMALLOC_TRACE_LOG(DMALLOC_LOCATION())
#define debug_malloc_touch(X) DMALLOC_TRACE_LOG(DMALLOC_LOCATION())
#define debug_malloc_pass(X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))
#define debug_malloc_pass(X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))
#define dmalloc_touch(TYPE,X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))
#define dmalloc_touch(TYPE,X) (DMALLOC_TRACE_LOG(DMALLOC_LOCATION()),(X))
#else
#else
/* DMALLOC_TRACE */
#define debug_malloc_update_location(X,Y) (X)
#define debug_malloc_update_location(X,Y) (X)
#define dmalloc_touch_svalue(X)
#define dmalloc_touch_svalue(X)
#define debug_malloc_touch(X)
#define debug_malloc_touch(X)
#define debug_malloc_pass(X) (X)
#define debug_malloc_pass(X) (X)
#define dmalloc_touch(TYPE,X) (X)
#define dmalloc_touch(TYPE,X) (X)
#endif
#endif
/* !MALLOC_TRACE */
#endif
#endif
/* !DEBUG_MALLOC */
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