Tag Info

New answers tagged

3

It also depends on the architecture. In ARM the first few locals are stored in registers only. As long as you do not call any other functions then these will never go on to the stack. You need to go the opposite direction. Rather than using globals you should start by limiting the scope if the variables as much as possible. Not only is this good coding ...


15

Allocating a variable on the stack and deallocating it is a simple addition and subtraction of the stack pointer. Given that it happens anyway when entering a function means that local variables are so cheap that trying to optimize them to anything else will generally incur more cost. Putting it in the data segment will incur a cache cost, the stack will ...


1

Storing files in memory doesn't seem such a bad idea if there are only a few of them. 1Mb of data isn't very much on modern servers so it's all down to the level of simultaneous users you have and what happens when you 'run out' of memory. In my experience I try to reduce the memory footprint size of each web service request because the server is usually a ...


-2

For simplicity, let you have 3 files upload.aspx preview.aspx and store.aspx You could place your upload button and all HTML things in upload.aspx and make a post request to preview.aspx with the uploaded contents. The file, preview.aspx, would simply parse the users' file and output it as a value of HTML form and would present a submit/Cancel button for ...



Top 50 recent answers are included