[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A C pointer passed to LISP
- To: firstname.lastname@example.org
- Subject: A C pointer passed to LISP
- From: shen@dolphin.Jpl.Nasa.Gov (Sheldon Shen)
- Date: Mon, 10 Feb 92 20:29:23 PST
It is mentioned in the Foreign Function Interface chapter that "Passing a pointer to LISP
data is not safe, because such data can be relocated at any time".
In my program, I pass a C pointer to LISP. It is a pointer to a STRUCT that maintains the
status of a database.
Eval (zone-pointer my-pointer) returns NIL. I guess it means that this is a relocatable
Repeatedly updating the database (or repeatedly using this pointer) eventually crashes
How do I make this pointer "safe'? Is there anyway to force a relocatable pointer
(The same update activities were tested in C first. And it is fine. I then assume it is LISP
causing the program.)
Any suggestions? Thanks.