Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-12-2007, 07:41 AM   #1
LQ Newbie
Registered: Feb 2007
Posts: 6

Rep: Reputation: 0
malloc always retuns NULL

Hello all,

I am calling this function malloc to create memory, but it always returns NULL. Could you please any one tell me how to resolve this..

Old 02-12-2007, 08:19 AM   #2
Senior Member
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
I think that it would be useful if you provided the relevant code.

Paste the lines in and surround them with code tags, that is code enclosed in square brackets



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
malloc retuns NULL sramy Linux - Server 1 02-12-2007 07:50 AM
What is meant by " file > /dev/null 2>&1 </dev/null " attockonian Linux - Newbie 5 06-30-2006 11:51 PM
JavaScript:: alert(node) shows null, but node != null taylor_venable Programming 1 05-01-2006 10:51 PM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 06:42 AM
Using sed to add carriage retuns and line numbers. Optimistic Programming 11 04-08-2005 02:13 AM

All times are GMT -5. The time now is 08:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration