English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 26 September 2020, 10:57   #21
BastyCDGS
Registered User
 
Join Date: Nov 2015
Location: Freiburg / Germany
Age: 44
Posts: 200
Send a message via ICQ to BastyCDGS
Quote:
Originally Posted by DMWCashy View Post
AllocVec will allocate an extra memory block chunk (I believe this is 8 bytes) for the memory details followed by the required memory. This makes it easy for FreeVec() to verify the block, by simply moving back one block ( Same as modern PC based memory heaps work)
If I remember correctly, the code for AllocVec is something like this:
Code:
    addq.l #4,d0
    move.l d0,-(sp)
    jsr _LVOAllocMem(a6)
    tst.l d0
    beq.s NoMem
    move.l d0,a0
    move.l (sp)+,(a0)+
    move.l a0,d0
    rts
NoMem: addq.l #4,sp
    rts
BastyCDGS is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning to Amiga. shoestring New to Emulation or Amiga scene 3 13 June 2020 05:13
Returning Amigan willbloke New to Emulation or Amiga scene 8 18 April 2017 11:47
Returning to Amiga after 25 years ... hedders New to Emulation or Amiga scene 17 07 May 2015 23:00
Another one returning GarethPW Member Introductions 5 06 July 2011 13:14
Returning to Amigas - new to emulation antonvaltaz Member Introductions 9 19 May 2009 12:02

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:09.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06261 seconds with 15 queries