LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-13-2009, 07:45 AM   #46
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled

One minor point to make: it isn't a memory leak if there's an accessible pointer to it.
Code:
#include <stdlib.h>


int main()
{
    char *characters = NULL;
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this is a memory leak*/
    characters = (char*) malloc(1000000); /*<-- this isn't a memory leak*/
}
Kevin Barry
 
Old 10-13-2009, 12:34 PM   #47
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by ibabhelix View Post
hey please tell me about using graphics on linux please
SDL library is the most used and easyest way to do graphics in linux
 
  


Reply



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
Cross Platform Programming Ace Blackwell Programming 17 01-26-2009 09:51 AM
Cross-platform programming drbongo Programming 3 07-28-2007 10:09 PM
Cross-Platform Programming JMJ_coder Programming 7 03-11-2007 12:59 PM
Linux Cross-Platform "C" Programming tux_addicted Programming 10 04-28-2006 03:50 AM
Multi-Platform Development/Programming al042077 Linux - Software 1 04-05-2004 05:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration