I usually manage memory so that the amount of allocations is minimal - mostly only on loading data/save files/whatever and startup. If the amount of data grows a lot on runtime, then I allocate by...
Type: Posts; User: maxorator
I usually manage memory so that the amount of allocations is minimal - mostly only on loading data/save files/whatever and startup. If the amount of data grows a lot on runtime, then I allocate by...
That's a very radical statement (what can be faster than just marking a memory page uncommitted after use?). About manual memory management - advanced programmers can make simple yet efficient memory...
I excluded library collectors because I know nothing about them, not because I think they're better/worse.
I don't know, I just can't accept it... not cleaning up after yourself is a violation of...
I'm not talking about garbage collector libraries, I'm talking about the builtin garbage collectors in some languages. Imagine that someone allocates huge junks of memory and references them with...
Malloc/free (aka delete/new) don't actively manage memory. You use malloc - it finds you an open slot, you use free - it marks that slot as available. But the garbage collector actively searches...
Calculations with pointers where the type is irrelevant.
Well you're right, I've got to admit type-safety is good when I'm doing ordinary stuff... but not when doing something really low-level.
People are supposed to collect their own garbage. It's better to write code that doesn't leave garbage in the first place.
Type-safety is often a nuisance since I have to use many typecasts to do...
Those are not things that can be done. Those are the methods how to do things. In C you just do them differently. I don't consider one of them to be better than the other - they're equal and both of...