TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 207

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 207', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Stack size reductions can also lower your program s RAM requirement. One way to figure out exactly how much stack you need is to fill the entire memory area reserved for the stack with a special data pattern. Then after the software has been running for a while preferably under both normal and stressful conditions use a debugger to examine the modified stack. The part of the stack memory area that still contains your special data pattern has never been overwritten so it is safe to reduce the size of the stack area by that amount. 1 Be especially conscious of stack space if you are using a real-time operating system. Most operating systems create a separate stack for each task. These stacks are used for function calls and interrupt service routines that occur within the context of a task. You can determine the amount of stack required for each task stack in the manner described earlier. You might also try to reduce the number of tasks or switch to an operating system that has a separate interrupt stack for execution of all interrupt service routines. The latter method can significantly reduce the stack size requirement of each task. The size of the heap is limited to the amount of RAM left over after all of the global data and stack space has been allocated. If the heap is too small your program will not be able to allocate memory when it is needed so always be sure to compare the result of malloc or new with NULL before dereferencing it. If you ve tried all of these suggestions and your program is still requiring too much memory you might have no choice but to eliminate the heap altogether. Limiting the Impact of C One of the biggest issues I faced upon deciding to write this book was whether or not to include C in the discussion. Despite my familiarity with C I had written almost all of my embedded software in C and assembly. In addition there has been much debate within the embedded software community about whether C is worth the performance penalty. It is .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.