Vocabularycpu.
architectureInputsdst | destination register symbol |
size | number of bytes to allocate |
class | one of the built-in classes listed in type-numbers |
temp | temporary register symbol |
OutputsNone
Word descriptionEmits machine code for allocating memory.
ExamplesIn this example 40 bytes is allocated and a tagged pointer to the memory is put in
RAX:
USING: cpu.architecture make ;
[ RAX 40 tuple RCX %allot ] B{ } make disassemble
0000000002270cc0: 498d4d10 lea rcx, [r13+0x10]
0000000002270cc4: 488b01 mov rax, [rcx]
0000000002270cc7: 48c7001c000000 mov qword [rax], 0x1c
0000000002270cce: 4883c807 or rax, 0x7
0000000002270cd2: 48830130 add qword [rcx], 0x30
DefinitionMethods