flat assembler
Message board for the users of flat assembler.
Index
> Main > traversing memory, fastest way to find a "null" Goto page Previous 1, 2 |
Author |
|
f0dder 04 Nov 2008, 14:12
Try googling for jemalloc, it's supposed to be a pretty decent (aka fast) memory allocator, for current hardware.
|
|||
04 Nov 2008, 14:12 |
|
LocoDelAssembly 10 Nov 2008, 03:02
Any news about this? Because of the silence of this thread now I'll keep the thread-safe version with me
|
|||
10 Nov 2008, 03:02 |
|
bitRAKE 11 Nov 2008, 09:07
This example shows what I use for cacheline size objects. Not thread safe, but threads shouldn't overlap at such a fine granularity, imho.
|
|||
11 Nov 2008, 09:07 |
|
adnimo 14 Nov 2008, 07:48
Hi, sorry for the absence I couldn't get a hold of inet lately (yeah I know...)
f0dder: all I found was a pdf and I'm still trying to understand the algorithm, it bragged mostly on how good it was and the explanation of the system was quite odd to my taste... LocoDelAssembly: I'm still playing with your code. mind you I'm quite a slow learner bitRAKE: I'm mostly concerned on how to deal with the memory block and all pointers rather than how to allocate it at the moment, unless I missed something from your code. |
|||
14 Nov 2008, 07:48 |
|
f0dder 14 Nov 2008, 12:13
adnimo: well, they put quite some effort into the algorithm, and the benchmarks compared to the classic BSD PHK allocator were positive - it was also adopted for FireFox3, where it apparently showed some nice improvements. It's not just about allocating blocks of memory fast, but also trying to reduced multithreaded sync overhead, and improve cache coherency.
|
|||
14 Nov 2008, 12:13 |
|
adnimo 15 Nov 2008, 12:47
yes, but that's the problem. I cannot develop anything _that_ advanced since I'm still learning, my idea was to make a simple memory pool library so I can get rid of the system malloc/free calls (huge overhead) for stuff like linked lists, arrays, etc. by already having allocated a big chunk of memory and then just managing the pointers by myself.
also, when doing malloc you never know if it'll happen to give you a portion of memory that is close to the last one you requested or if it's at the very end of the address space, right now I would only use a memory pool for node systems, etc. where the allocation calls are very frequent, not so much for arrays, etc. |
|||
15 Nov 2008, 12:47 |
|
bitRAKE 16 Nov 2008, 18:03
adnimo wrote: bitRAKE: I'm mostly concerned on how to deal with the memory block and all pointers rather than how to allocate it at the moment, unless I missed something from your code. Code: macro getBlock reg0*,reg1*{ mov reg0,reg1 mov reg1,[reg1] } macro putBlock reg0*,reg1*{ mov [reg0],reg1 mov reg1,reg0 } (Looks like the same thing LocoDelAssembly posted - just in another form.) _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
16 Nov 2008, 18:03 |
|
LocoDelAssembly 16 Nov 2008, 18:28
Quote:
If you mean your mem_hog.asm I think it is the same, at least your initialization loop seems to do exactly the same I do but written sightly different. I'm unsure about your macros though, how are supposed to be used? |
|||
16 Nov 2008, 18:28 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.