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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+2 −0
Original line number Diff line number Diff line
@@ -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)