utility library thats seen used in more and more engines nowadays.
look up my ftp ip in general in the mingw compiler thread and grab this nedmalloc.7z if you want to try it out.
upto 125% faster than msvc malloc.
uses the same methods as dlmalloc.
to use in your own engine add nedmalloc.h at the start of quakedef.h
then add this to the compiler defines REPLACE_SYSTEM_ALLOCATOR
and add nedmalloc.lib to libraries.
faster malloc
-
- Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
- Contact:
Ehh, include files shouldn't include other include files. It creates a dependency hell situation, and can make the c preprocessor take longer than necessary, as it would process the same header more than needed.
My 2 cents about that.
My 2 cents about that.
Get off my lawn!Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
actually for most purposes and intents thats what headers do "besides holding structs etc"
if the idea disgust you that much you can also include the nedmalloc.h header in any file that uses a malloc function but as you might soon discover that includes allmost 90% of the engine
quakedef.h is included by pretty much all the files in quake so if you put it there it will be globally accessible sort of a win-win situation.
btw the normal way of including nedmalloc is by including its source in whatever project you want to use it on. i just made it a library for convinience.
if the idea disgust you that much you can also include the nedmalloc.h header in any file that uses a malloc function but as you might soon discover that includes allmost 90% of the engine
quakedef.h is included by pretty much all the files in quake so if you put it there it will be globally accessible sort of a win-win situation.
btw the normal way of including nedmalloc is by including its source in whatever project you want to use it on. i just made it a library for convinience.
-
- Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
- Contact:
That's what I'm doing with my engine right now, I'm fixing all of the included include files... It's PITA.reckless wrote: if the idea disgust you that much you can also include the nedmalloc.h header in any file that uses a malloc function but as you might soon discover that includes allmost 90% of the engine
Get off my lawn!Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Well best of luck with GNU stdlib.h then!dreadlorde wrote:Ehh, include files shouldn't include other include files. It creates a dependency hell situation, and can make the c preprocessor take longer than necessary, as it would process the same header more than needed.
My 2 cents about that.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-
- Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
- Contact:
Gahhh, don't remind me..mh wrote: Well best of luck with GNU stdlib.h then!
I may use lunix (I use windows 7 too), but that doesn't mean I like the crap gnu pushes out, or lunix for that matter..
Get off my lawn!Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.