30 Nov, 2009, Silenus wrote in the 1st comment:
Votes: 0
Hi,

I have been working on some code where the data I read in is of a fixed predetermined size which I know prior to running the program. I am curious what is the relationship between doing a custom static allocation and doing this with malloc and sbrk? Would the static allocation be faster since you have requested the entire block at the beginning?
30 Nov, 2009, Tyche wrote in the 2nd comment:
Votes: 0
What do you mean by "custom static allocation"?
30 Nov, 2009, Silenus wrote in the 3rd comment:
Votes: 0
I mean creating a large global array in the static block and mapping the data into that.
30 Nov, 2009, Tyche wrote in the 4th comment:
Votes: 0
Silenus said:
I mean creating a large global array in the static block and mapping the data into that.


The data segment then as in …

segment .data
myarray times 2000 db 0

Data segments are part of the executable size, so load time might be longer.
Should be trivial for you to test on a particular operating system.
01 Dec, 2009, Silenus wrote in the 5th comment:
Votes: 0
Thanks
0.0/5