diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-04-06 00:57:24 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-04-06 00:57:24 -0700 |
commit | c5acd13409cca8f95b7a921efc12ad8833713ffe (patch) | |
tree | ef9779d7283bf68f3531e2dc0402f18cdfd267be /txr.1 | |
parent | 064d4cd974f5e54cb310838eb25e36a6bf83d24d (diff) | |
download | txr-c5acd13409cca8f95b7a921efc12ad8833713ffe.tar.gz txr-c5acd13409cca8f95b7a921efc12ad8833713ffe.tar.bz2 txr-c5acd13409cca8f95b7a921efc12ad8833713ffe.zip |
New function: cptr-size-hint.
* eval.c (eval_init): Register cptr-size-hint intrinsic.
* lib.c (cptr_size_hint): New function.
* lib.h (cptr_size_hint): Declared.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -59882,6 +59882,26 @@ The expression .code "(cptr-int 0)" also produces a null pointer on all platforms where \*(TX is found. +.coNP Function @ cptr-size-hint +.synb +.mets (cptr-size-hint < cptr << bytes ) +.syne +.desc +The +.code cptr-size-hint +function indicates to the garbage collector that the given +.meta cptr +object is associated with +.meta bytes +of foreign memory that are otherwise invisible to the garbage collector. + +Note: this function should be used if the foreign memory is indirectly +managed by the +.meta cptr +object in cooperation with the garbage collector. Specifically, +.meta cptr +should have a finalizer registered against it which will liberate the +foreign memory. .SH* FOREIGN FUNCTION INTERFACE |