flat assembler
Message board for the users of flat assembler.
Index
> Windows > Very Long Strings (RB) in fasm? |
Author |
|
baldr 28 May 2010, 07:06
Nameless,
Allocate memory dynamically, reallocate if it's not big enough. BTW, Buffer rb 429496 compiles just fine. Probably you've meant Buffer rb 4'294'967'295? |
|||
28 May 2010, 07:06 |
|
Nameless 28 May 2010, 11:12
yea it compiles fine, and works fine too
but when the directory have lots of files it doesn't, either crashing or not showing all files how can i do that Dynamic Memory Allocation? APIs? functions? |
|||
28 May 2010, 11:12 |
|
shoorick 28 May 2010, 12:40
VirtualAlloc
HeapAlloc (<=4Mb) |
|||
28 May 2010, 12:40 |
|
Nameless 29 May 2010, 01:52
and the variable declaration is the same?
Code:
Buffer rb 429496
or Code: Buffer db 128 dup(?) |
|||
29 May 2010, 01:52 |
|
bitshifter 29 May 2010, 02:19
They return pointer to memory...
Code: ; I need this much memory nSize dd 4096 ; I am pointer to memory pBlock dd NULL ; Get pointer to memory invoke GlobalAlloc,GPTR,[nSize] mov [pBlock],eax ; Release pointer to memory invoke GlobalFree,[pBlock] |
|||
29 May 2010, 02:19 |
|
baldr 29 May 2010, 07:45
bitshifter,
While using GlobalXxx() is not considered as a deadly sin (on occasions you must use it, e.g. in clipboard operations), better practice is to avoid the unneeded overhead and resource consumption — use HeapXxx() (or VirtualXxx() if you need memory in bulk). |
|||
29 May 2010, 07:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.