Page 1 of 1
Posted: Tue Mar 04, 2003 12:41 pm
by BackupUser
Restored from previous forum. Originally posted by Cardian.
Please:
IsFreeMemory(#Memory)
Return:
0 => False
1 => True
or / and
IsNextFreeMemory(#Memory)
Return:
0 => no MemoryNr available
n => MemoryNr
Comment: Useful for better Memory-Managment.
Posted: Tue Mar 04, 2003 8:21 pm
by BackupUser
Restored from previous forum. Originally posted by Voldemort.
http://www.purebasic.com/documentation/ ... emory.html
Posted: Wed Mar 05, 2003 1:56 pm
by BackupUser
Restored from previous forum. Originally posted by Cardian.
??? and ???
"Allocates a contiguous memory area according to the specified size. If the needed memory is available, Result contains the start address of the memory area, else Result is 0. Flags must be 0 for now and will be supported later. If another memory bank was previously allocated with the same #Memory number, then the previous memory bank is automatically freed."
Example:
Is Nr 12345 now free? I will not the old data lose or allocate!
How know you the next free MemoryNr? Without the old data to overwrite.
Posted: Wed Mar 05, 2003 5:16 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.
Cardian, indeed that would be a useful command if you look on how the PB memory commands work today, but Fred has mentioned that he will change the memory library, so chances are slim(i assume) that he will add this right now. Who knows, maybe you wont need a command like this in the next reincarnation of this library. For the time being i would recommend you to look at the API command GlobalAlloc_() it's really easy and you get full control over the memory management..
Posted: Thu Mar 06, 2003 8:32 am
by BackupUser
Restored from previous forum. Originally posted by Cardian.
Cool, i'm waiting. I know GlobalAlloc_(), but PB must too to better. Thx for the info.