2 ms·
> In one instance he like all other programmers was forbidden to use malloc. And everything was on the stack and of size 512 - EVERYTHING. Who made that decisio
by nostrademons 18y ago
> In one instance he like all other programmers was forbidden to use malloc. And everything was on the stack and of size 512 - EVERYTHING. Who made that decision? Why the financial managers obviously!
Many financial software houses operate under very strict latency constraints, where a microsecond or two more means that somebody else got the trade you were going for. I've even heard of hedge funds colocating boxes on the exchange floor so that they can avoid the network delay of sending messages a few blocks to headquarters. In this environment, the cost of dynamic memory allocation can be significant, and garbage collection is most certainly out.
Same thing in the avionics industry and other hard-realtime situations: malloc is forbidden because its time complexity cannot be predicted by the programmer.
I have no idea if this is why he couldn't use malloc or whether it was plain management stupidity. But the idea is not as absurd as it seems at first.
- deleted 18y ago[deleted]
- biohacker42 18y agoIn this specific case time constraints had nothing to do with that. On other occasions time constrains were a very big deal as were atomic transactions, except that NO one around had heard of the terms real time and atomic transactions. So they did a horrible job of reinventing something like a good DB.