caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Max Skaller <skaller@ozemail.com.au>
To: caml-list@inria.fr
Subject: memory problem (Linux/malloc)
Date: Sun, 17 Dec 2000 00:48:10 +1100	[thread overview]
Message-ID: <3A3B729A.97875EF0@ozemail.com.au> (raw)

Um.. sorry to ask a question not directly related to Ocaml..
I'm running Linux (Redhat 6.1) The following program
appears to leak:

#include <stdlib.h>

int main(int argc, char**argv)
{
  for(;;) {
    void *a = malloc(100);
    void *b = malloc(78);
    void *c = malloc(99);
    free(a); free(b); free(c);
  }
}

I'm baffled. This shouldn't cause fragmentation, should it?
Does anyone know of a leak in this version of Linux/glibc/malloc?
[The leak is visible by running 'free']

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net



                 reply	other threads:[~2000-12-18 14:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A3B729A.97875EF0@ozemail.com.au \
    --to=skaller@ozemail.com.au \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).