Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Vladimir Sedach
storage
Commits
c69ebc13
Commit
c69ebc13
authored
Feb 18, 2012
by
Stas Boukarev
Browse files
copy-mem: Don't touch more memory than needed.
parent
480ad121
Changes
1
Show whitespace changes
Inline
Side-by-side
io-sbcl.lisp
View file @
c69ebc13
...
...
@@ -121,9 +121,14 @@
(
declaim
(
inline
copy-mem
))
(
defun
copy-mem
(
from
to
length
)
(
loop
for
i
below
length
by
sb-vm:n-word-bytes
(
multiple-value-bind
(
words
rest
)
(
truncate
length
sb-vm:n-word-bytes
)
(
loop
repeat
words
for
i
by
sb-vm:n-word-bytes
do
(
setf
(
sb-sys:sap-ref-word
to
i
)
(
sb-sys:sap-ref-word
from
i
))))
(
sb-sys:sap-ref-word
from
i
)))
(
loop
for
i
from
(
-
length
rest
)
below
length
do
(
setf
(
sb-sys:sap-ref-8
to
i
)
(
sb-sys:sap-ref-8
from
i
)))))
(
declaim
(
inline
read-ascii-string-optimized
))
(
defun
read-ascii-string-optimized
(
length
string
stream
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment