Changeset 9474 for branches/ia32/level-0


Ignore:
Timestamp:
May 14, 2008, 6:12:54 PM (11 years ago)
Author:
rme
Message:

Write functions egc, lisp-heap-gc-threshold, and set-lisp-gc-threshold.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-utils.lisp

    r9369 r9474  
    318318the sense that calls to it are serialized), it doesn't make a whole lot
    319319of sense to be turning the EGC on and off from multiple threads ..."
    320   (int ($ 3))
     320  (check-nargs 1)
     321  (clrl imm0)
     322  (cmp-reg-to-nil arg)
     323  (setne (% imm0.b))
     324  (movd (% imm0) (% mm0))
     325  (movl ($ arch::gc-trap-function-egc-control) (% imm0))
     326  (uuo-gc-trap)
    321327  (single-value-return))
    322328
     
    345351  (single-value-return))
    346352
     353(defx8632lapfunction lisp-heap-gc-threshold ()
     354  "Return the value of the kernel variable that specifies the amount
     355of free space to leave in the heap after full GC."
     356  (check-nargs 0)
     357  (movl ($ arch::gc-trap-function-get-lisp-heap-threshold) (% imm0))
     358  (uuo-gc-trap)
     359  (jmp-subprim .SPmakeu32))
     360
     361(defx8632lapfunction set-lisp-heap-gc-threshold ((new arg_z))
     362  "Set the value of the kernel variable that specifies the amount of free
     363space to leave in the heap after full GC to new-value, which should be a
     364non-negative fixnum. Returns the value of that kernel variable (which may
     365be somewhat larger than what was specified)."
     366  (check-nargs 1)
     367  (save-simple-frame)
     368  (call-subprim .SPgetu32)
     369  (movd (% imm0) (% mm0))
     370  (movl ($ arch::gc-trap-function-set-lisp-heap-threshold) (% imm0))
     371  (uuo-gc-trap)
     372  (restore-simple-frame)
     373  (jmp-subprim .SPmakeu32))
     374
    347375(defx8632lapfunction use-lisp-heap-gc-threshold ()
    348376  "Try to grow or shrink lisp's heap space, so that the free space is (approximately) equal to the current heap threshold. Return NIL"
Note: See TracChangeset for help on using the changeset viewer.