Whenever you are building an application that's memory intensive, you are bound to run into memory issues. Those out of memory errors are painful to deal with, especially when they happen during production. Before putting your code on your server, you need to make sure that it can handle the application's memory requirements. But even … Continue reading How To Add Swap Space On Ubuntu
Tag: Memory
What Is External Sorting?
Sorting is one of the most common things we do in programming. We are given a bunch of numbers and we want to arrange them according to some rule. Let's say we want to arrange them in ascending order. To sort these numbers, people tend to use a sorting algorithm that takes place entirely within … Continue reading What Is External Sorting?
Why Do We Need size_t?
In statically typed programming languages, datatypes play a very important role. Some of common datatypes are int, float, char, double, etc. Different datatypes have different functionalities and we use them depending on our requirements. In modern C++ code, the type "size_t" is used a lot of instead of int or unsigned int. It appears in … Continue reading Why Do We Need size_t?
Why Is Python Slow?
When people talk about speed in the world of programming languages, they usually center the discussion around compiled vs interpreted languages. In this post, we will discuss two of the most famous languages on this planet, Python and C. I was recently playing around with this and I made a few pleasant discoveries. So I … Continue reading Why Is Python Slow?
Exploring The Hidden C++ Features
People have been using C++ for a long time now and most of us think that we are pretty well versed with it. Interestingly enough, as we spend more time with something, we keep discovering more things about it. I love it when the thing you have been using for so long turns out to … Continue reading Exploring The Hidden C++ Features
What Is Tail Recursion?
Programmers deal with recursion all the time. It's actually quite a nice concept, but not a lot of people use it because of the mystery associated with it. To be honest, there's no mystery as such! Sometimes, a problem is too complex to solve because it is too big. If we can break the problem … Continue reading What Is Tail Recursion?
What Is Pointer Casting?
We all know how important pointers are in C++. A pointer is basically an object that contains an address to a variable. We can use this address to access the value stored in that variable, and that variable is located somewhere in the memory. It's like how we use an address to locate someone in … Continue reading What Is Pointer Casting?
How To Deal With Buffer Overflow
You must have encountered the word 'buffer' somewhere in your life. In everyday usage, buffer refers to something that acts as an intermediary between two things that don't get along. It's a shield which moderates the impact of one thing over the other. In the programming world, buffer refers to an area where we temporarily … Continue reading How To Deal With Buffer Overflow
C++ Vector Memory Release
When you use C++ STL, it takes care of freeing up memory after a variable goes out of scope. But let's say you have some code that needs the memory to be freed up immediately. This can happen under many circumstances when you are working under constrained resources. One of the more popular STL containers … Continue reading C++ Vector Memory Release
EXC_BAD_ACCESS Problem In Objective-C
So you finally stumbled upon this error. If you have been working with Objective-C, this is bound to happen. When you release the memory of an object that has already been released, and then try to go back to your previous UIViewController, you will encounter this error. One of the possible reasons could be that … Continue reading EXC_BAD_ACCESS Problem In Objective-C