Commit 7234a088 authored by Stas Boukarev's avatar Stas Boukarev
Browse files

Flush the right amount of data when in write-ascii-string-optimized.

parent 21db675c
......@@ -50,7 +50,7 @@
(make-string (or object-size 10000)))
(defmethod create-test-object ((type (eql 'constant-string)) &key)
#.(coerce "AAAAAAAAAAAAAAAAdddddddddddddddddddddsssssssssssss" 'simple-base-string))
#.(coerce "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 'simple-base-string))
(defun class-preallocation-test (storage)
(loop for class in (storage-data storage)
......@@ -278,6 +278,8 @@
(left-length (sb-ext:truly-the word (- length left))))
(declare (word left left-length))
(copy-mem string-sap (sb-sys:int-sap position) left)
(setf (output-stream-buffer-position stream)
(output-stream-buffer-end stream))
(flush-buffer stream)
(copy-mem (sb-sys:sap+ string-sap left)
(sb-sys:int-sap start) left-length)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment