From 0502160cf0bade32f070a72b99d76c6b9e3da9d0 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Fri, 27 Oct 2006 21:44:42 +0000 Subject: [PATCH] 0.9.18.11: Remove unused (probably wrong) definition of malloc from sb-bsd-sockets --- contrib/sb-bsd-sockets/malloc.lisp | 16 ---------------- contrib/sb-bsd-sockets/sb-bsd-sockets.asd | 1 - 2 files changed, 17 deletions(-) delete mode 100644 contrib/sb-bsd-sockets/malloc.lisp diff --git a/contrib/sb-bsd-sockets/malloc.lisp b/contrib/sb-bsd-sockets/malloc.lisp deleted file mode 100644 index 0b6ca39..0000000 --- a/contrib/sb-bsd-sockets/malloc.lisp +++ /dev/null @@ -1,16 +0,0 @@ -(in-package :sb-bsd-sockets-internal) - -(defun malloc (size) - "Allocate foreign memory in some way that allows the garbage collector to free it later. Note that memory allocated this way does not count as `consed' for the purposes of deciding when to gc, so explicitly calling EXT:GC occasionally would be a good idea if you use it a lot" - ;; we can attach finalizers to any object, and they'll be called on - ;; the next gc after the object no longer has references. We can't - ;; however make the finalizer close over the object, or it'll never - ;; have no references. I experimentally determined that (sap-alien - ;; (alien-sap f)) is not EQ to f, so we can do it that way - (let* ((memory (make-alien (unsigned 8) size)) - (alias (sap-alien (alien-sap memory) - (* (unsigned 8))))) - (sb-ext:finalize memory - (lambda () - (free-alien alias))))) - diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 7b2aaa1..eb49b66 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -11,7 +11,6 @@ #+sb-building-contrib "SYS:CONTRIB;SB-BSD-SOCKETS;" :components ((:file "defpackage") (:file "split" :depends-on ("defpackage")) - (:file "malloc" :depends-on ("defpackage")) #+win32 (:file "win32-lib") #-win32 (sb-grovel:grovel-constants-file -- 1.7.10.4