LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-12-2007, 06:41 AM   #1
sramy
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..

thanks
ramy
 
Old 02-12-2007, 07:19 AM   #2
graemef
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
 
  


Reply

Tags
malloc


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 06:50 AM
What is meant by " file > /dev/null 2>&1 </dev/null " attockonian Linux - Newbie 5 06-30-2006 10:51 PM
JavaScript:: alert(node) shows null, but node != null taylor_venable Programming 1 05-01-2006 09:51 PM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 05:42 AM
Using sed to add carriage retuns and line numbers. Optimistic Programming 11 04-08-2005 01:13 AM


All times are GMT -5. The time now is 08:19 AM.

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