Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,273
Issues
4,273
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
413
Merge Requests
413
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
2ec7f46d
Commit
2ec7f46d
authored
Jun 24, 2003
by
stolz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2003-06-24 13:45:49 by stolz]
Remove large chunk of duplicated documentation.
parent
3251d5d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
ghc/rts/Stable.c
ghc/rts/Stable.c
+1
-16
No files found.
ghc/rts/Stable.c
View file @
2ec7f46d
/* -----------------------------------------------------------------------------
* $Id: Stable.c,v 1.2
5 2003/03/31 19:19:34 sof
Exp $
* $Id: Stable.c,v 1.2
6 2003/06/24 13:45:49 stolz
Exp $
*
* (c) The GHC Team, 1998-2002
*
...
...
@@ -73,21 +73,6 @@
There may be additional functions on the C side to allow evaluation,
application, etc of a stable pointer.
When Haskell calls C, it normally just passes over primitive integers,
floats, bools, strings, etc. This doesn't cause any problems at all
for garbage collection because the act of passing them makes a copy
from the heap, stack or wherever they are onto the C-world stack.
However, if we were to pass a heap object such as a (Haskell) @String@
and a garbage collection occured before we finished using it, we'd run
into problems since the heap object might have been moved or even
deleted.
So, if a C call is able to cause a garbage collection or we want to
store a pointer to a heap object between C calls, we must be careful
when passing heap objects. Our solution is to keep a table of all
objects we've given to the C-world and to make sure that the garbage
collector collects these objects --- updating the table as required to
make sure we can still find the object.
*/
snEntry
*
stable_ptr_table
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment