master: alloc-buffer: check the type of size once

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  2419acbc363d889e6bdedb3b380877e1b808edaf (commit)
      from  dd3bf6030c96bd4449e1ed1d5d126ff37953c861 (commit)

- Log -----------------------------------------------------------------
commit 2419acbc363d889e6bdedb3b380877e1b808edaf
Author: Stas Boukarev <[email protected]>
Date:   Wed Apr 15 22:50:52 2026 +0300

    alloc-buffer: check the type of size once
---
 src/code/fd-stream.lisp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp
index 5d81184fb..346d8da2c 100644
--- a/src/code/fd-stream.lisp
+++ b/src/code/fd-stream.lisp
@@ -68,7 +68,8 @@
 (defun alloc-buffer (&optional (size +bytes-per-buffer+))
   (declare (sb-c::tlab :system)
            (inline allocate-system-memory) ; so the SAP gets heap-consed
-           (inline !make-buffer))
+           (inline !make-buffer)
+           (index size))
   ;; Don't want to allocate & unwind before the finalizer is in place.
   (without-interrupts
     (let* ((sap (allocate-system-memory size))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.