Posts

Showing posts with the label codeblocks

Forgot to deallocate infinite chunk of memory

Forgot to deallocate infinite chunk of memory In my Ubuntu machine, Codeblocks software I allocated infinite chunk of memory without any deallocation. And after that my machine became slow. After restarting the system everything seems ok. Will be there any problem in future? You can't allocate an infinite chunk of memory in the first place. – user2357112 Jul 1 at 5:19 Memory allocated by the usual mechanisms ( malloc , calloc , new , mmap , ...) is internal to the process and will be released when the process dies. Shared memory allocations ( shmget , semget , ...) can persist after the process dies, but will not survive a reboot. So your system should be back to normal, with no lingering effects from the large allocation. – ottomeister Jul 1 at 23:45 ...