C provides a suite of functions ,to provide robust and concrete dynamic memory allocation, namely malloc, realloc, calloc and free.
void * malloc ( size_t size );
size: The number of bytes you wish to allocate.
Malloc allocates a block of memory and returns a void pointer to the start of that memory location. If the function failed to allocate the requested block of memory, a null pointer is returned.
When you malloc a block, it actually allocates a bit more memory than you asked for. This extra... [More]
Typically, when the operating system is deployed it uses a generic configuration in order to provide a fair performance for any kind of application. The term application, in this paper, is used to reference any software that is executed over the operating system. Therefore, databases, web servers, e-mail servers, in-house made softwares, etc, all of them are referred here by the generic term “application”.
The behavior of each application depends on how it was designed and developed, but also on how it is used. At the... [More]
In order to better serve our community we would like your input in our first ever Real World Linux survey. It will just take a few minutes and your answers are completely anonymous. This will cover what information interests you and what mechanisms you would like to notify you of updates. If you have problems with the embedded form, you can go to this external link . We appreciate your participation.
As a side note, this survey uses the free and open LimeSurvey package running on a Linux server.
iframes are not available for... [More]
Ubuntu One - The cloud storage service provided by Canonical , has introduced a new feature related to photos on it's web dashboard. With this feature, users can browse and share the photos that are stored in their Ubuntu One account. In short, you get a web interface on your personal cloud storage (snapshot above) to browse and share your photos. The sharing can be done with popular social media platforms like Twitter and Facebook. Besides, there are certain other features like slide show of photos when you... [More]
In a big announcement made by Canonical this week, the company announced Ubuntu OS for smart-phones. This OS for smart phones comes with a very different UI which aims to provide almost everything that you want - in just one swipe. Unlike other popular smart phones, the UI of Ubuntu phones rely heavily on the edge screen swipes. A swipe on each side screen of Ubuntu powered mobile device provides you a with a new set of features. This makes navigation between applications very easy. Also Ubuntu powered smart phones will have the same... [More]
The htop utility in Linux allows you to interactively monitor the processes in real time. It's very similar to top but has some extra features that makes it an even better command line utility for process monitoring. Here is an excerpt from the man page of htop : Htop is a free (GPL) ncurses-based process viewer for Linux. It is similar to top, but allows you to scroll vertically and horizon‐ tally, so you can see all the processes running on the system, along with their full command lines. Tasks related to processes (killing, ... [More]
Linus Torvalds lost his cool recently in official mailing list. His raw anger came in as a reaction when Mauro Carvalho Chehab, one of the Linux kernel maintainer introduced a buggy patch into the kernel but blamed pulseaudio software for the functionality break. Here is what Mauro said : Are you saying that pulseaudio is entering on some weird loop if the > returned value is not -EINVAL? That seems a bug at pulseaudio. To this, Linus responded furiously in the same mailing list : Mauro, SHUT THE F@#$ UP! It's a bug alright - in the... [More]
Hi, I am Himanshu Arora, owner of Real world Linux
group. As the year 2012 dawns and year 2013 rises, I'd like to wish all
the group members a happy and prosperous new year. Let's all make at
least one resolution to see a better us as we step in 2013. The team behind Real World Linux group has lots to offer in 2013. So, stay connected and experience the best of Linux in 2013. " Begin another new chapter and remember that you have 365 days
to make every page of the chapter worth remembering when you finish the
year. " -... [More]
Chris Walden, here, Managing Editor for Linux and Open Source on developerWorks and creator of this "Real World Linux" community. I wanted to share something with all of you as we close out 2012. PC World, a publication that is not necessarily known for pushing Linux had a recent article: Five reasons 2012 was a great year for Linux . If you are feeling discouraged about spreading more Linux around your life, it may pick you up a little. If you already have plenty of Linux and want to help other people understand it might bring... [More]
With the release of GNU sed version 4.2.2, the maintainer Paolo Bonzini has resigned from his post. He has been the maintainer of GNU sed project for past eight years. Also, for past three years he was maintaining the GNU grep project. In this latest development, he has announced his resignation from both the projects following a controversy over the control of the name and code base of gnuTLS project. In his announcement, Paolo said :
I am less pleased to announce that I am resigning from maintenance of GNU sed (after 8 years) as well... [More]
A few days back, I was trying to find details of a specific type of files on my Ubuntu box in office. Here is what I was trying to do : find ./ -name "*.out" | xargs ls -lart As you can see that I was trying to list out the details of all the files having .out extension. So far so good as I got what I wanted. Then one of my colleague wanted to use the same command on his Linux machine so he asked me to copy and send it to him. Though copying from command line using mouse and keyboard is not that difficult but somehow after I... [More]
The Linux foundation came up with a video recently that celebrates the success and milestones achieved by Linux in the year 2012. The video shows how Linux powered devices like Android smart-phones and supercomputers are dominating the world today. Other than this, video highlights chromebooks being sold by google and Linux conferences that took place around the world in 2012. Watch the video for more.
Note : The credits for the video goes to the author. The Intention is to just share the information through this... [More]
The other day when I was searching for some file in my Linux system, I got a result with name 'TheLinuxCommandLine'. I was not sure what type of file was that as ' vim TheLinuxCommandLine ' produced the following output :
3006 0 obj^M<>stream^M
While I got a clue from the word 'PDF' in the output above that it could be a PDF file but then I thought that there should be utility that could gracefully tell the type of file supplied to it as input. I searched a bit and found a Linux command line... [More]
Canonical announced the release of Kubuntu and Edubuntu 13.04 (Raring Ringtail) Alpha 1 on December 6 2012. The company clarified that the there will be no alpha release for Ubuntu 13.04 and the first official release for Ubuntu 13.04 would be available only as a beta release which is scheduled towards the end of march 2013. This was decided in the Ubuntu developer summit for Raring Ringtail. While people can still get hold of the daily Ubuntu images , the current alpha release is only for Kubuntu and Edubuntu. Here is what Stéphane... [More]
While going through an article on Linux text processing commands, I came across Linux sort command. I found this command interesting enough to read more about it and try out some of it's examples. So here in this article, I'll share my understanding on Linux sort command through some examples.
Before jumping on to examples, here is an excerpt of information from the man page of sort command:
sort - sort lines of text files
sort [OPTION]... [FILE]...
sort [OPTION]... --files0-from=F