|
|
|
|
|
by haberman
3747 days ago
|
|
> Did you even make sure the memory was aligned? Of course, what do you take me for? :) > I'm sure you know alloc() Do you mean alloca? It has a lot of problems, and is generally prohibited at Google. > and malloc() is fast for small sizes. Not nearly fast enough for my purposes. |
|
> Yes, alloca. (Don't use it.)
> Just make a fast allocator that uses heap instead of the stack. You only need to malloc once and it can be used for any type since like you pointed out, it's effective type can be changed.