mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +01:00
Fixed a bug of %allocate
This commit is contained in:
parent
7f06ce6600
commit
fdefd16eda
1 changed files with 3 additions and 6 deletions
|
@ -2130,18 +2130,15 @@ codegen-target @ s" no-codegen" str= not [if]
|
|||
then drop
|
||||
;
|
||||
|
||||
|
||||
( === Heap Memory === )
|
||||
|
||||
need-defined allocate
|
||||
|
||||
\ allocate heap memory
|
||||
: %allocate ( align size -- addr e )
|
||||
over + allocate ?dup if
|
||||
\ ( align addr e )
|
||||
>r 2drop 0 >r
|
||||
else
|
||||
swap 1- & success
|
||||
then
|
||||
over + allocate throw
|
||||
swap 1- invert and success
|
||||
;
|
||||
|
||||
( === Buffered File I/O === )
|
||||
|
|
Loading…
Reference in a new issue