[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nonrelocatable block upon startup

I can't figure out how to launch my image with a nonrelocatable
block set aside in the mac heap automatically upon startup.

What I've been trying so far is to defvar a pointer and then wrap
the allocation itself in an eval-when; let my sourcefile be:

  ;; sourcefile.lisp__________________________________________

  (defvar *pointer* nil)

  (eval-when (:load-toplevel :compile-toplevel :execute)
    (setf *pointer* (#_newptr 256)))

  ; &more ...

  ;; end of sourcefile.lisp___________________________________

I load the compiled file and then call save-application to dump
the image. However, after launching it, *pointer* turns out to
be a #<Dead Mac-Pointer ...>, unless I have an init file which
allocates the space again via (setf *pointer* (#_newptr 256)).

What am I doing wrong?

Any hints greatly appreciated, 

Tobias Kunze