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
d9c6f02f
Commit
d9c6f02f
authored
25 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
bugfix for gc callback
Rev: src/gc.h:1.41
parent
06fe8778
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/gc.h
+4
-4
4 additions, 4 deletions
src/gc.h
with
4 additions
and
4 deletions
src/gc.h
+
4
−
4
View file @
d9c6f02f
/*
* $Id: gc.h,v 1.4
0
2000/05/
04 03:14:31
hubbe Exp $
* $Id: gc.h,v 1.4
1
2000/05/
16 08:37:24
hubbe Exp $
*/
#ifndef GC_H
#define GC_H
...
...
@@ -21,7 +21,7 @@ extern struct callback_list evaluator_callbacks;
extern
void
*
gc_svalue_location
;
#endif
#define ADD_GC_CALLBACK() gc_evaluator_callback=add_to_callback(&evaluator_callbacks,(callback_func)do_gc,0,0)
#define ADD_GC_CALLBACK()
do { if(!gc_evaluator_callback)
gc_evaluator_callback=add_to_callback(&evaluator_callbacks,(callback_func)do_gc,0,0)
; }while(0)
#define LOW_GC_ALLOC(OBJ) do { \
extern int d_flag; \
...
...
@@ -38,12 +38,12 @@ extern void *gc_svalue_location;
#ifdef ALWAYS_GC
#define GC_ALLOC(OBJ) do{ \
LOW_GC_ALLOC(OBJ); \
if(!gc_evaluator_callback)
ADD_GC_CALLBACK(); \
ADD_GC_CALLBACK(); \
} while(0)
#else
#define GC_ALLOC(OBJ) do{ \
LOW_GC_ALLOC(OBJ); \
if(num_allocs == alloc_threshold
&& !gc_evaluator_callback
) \
if(num_allocs == alloc_threshold) \
ADD_GC_CALLBACK(); \
} while(0)
#endif
...
...
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