🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.os.vms
Article #7

Re: pb avec l'instruction free (lang c) et VM

#7
From: Éric Lévénez
Date: Fri, 08 Mar 2002 12:27
23 lines
2198 bytes
Le 8/03/02 9:58, dans
8acca07407d559fa468961076df6b9b8.76015@mygate.mailgate.org, ��Christian
Sperandio�� <christian.sperandio@cegedim.fr> a �crit�:

> bonjour � tous, je d�veloppe sur un mainframe IBM (os VM) en C et j'ai
> un petit probl�me: l'instruction 'free' ne lib�re pas la m�moire.
> 
> Quelqu'un a-t-il d�j� eu ce probl�me et peut m'aider?

Sous unix, c'est g�n�ralement le cas. Malloc alloue de la m�moire virtuelle
et la mappe dans l'espace d'adressage du process. Free lib�re le pointeur
interne dans malloc, mais pas la m�moire allou�e. Si l'on refait un malloc,
on reprend le m�me espace (en gros).

Pour g�rer effectivement la m�moire virtuelle il faut utiliser brk/sbrk,
mais l� il devient impossible d'utiliser malloc ou toute fonction qui
utilise malloc. � l'origine, malloc utilisait brk/sbrk.

Bref le comportement de free que tu as, n'est pas une erreur, mais d�pend
enti�rement de ton impl�mentation.

-- 
�ric L�v�nez -- <http://www.levenez.com>
Technical Details
Message-ID: <B8AE6CD6.C4EA%eric@levenez.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!news1-2.free.fr!not-for-mail
References: <8acca07407d559fa468961076df6b9b8.76015@mygate.mailgate.org>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: f9822,2a7cf75c1e37ed7a
X-Google-Attributes: gidf9822,public
X-Google-Thread: fcd99,2a7cf75c1e37ed7a
X-Google-Attributes: gidfcd99,public
X-Google-ArrivalTime: 2002-03-08 04:27:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!news1-2.free.fr!not-for-mail
User-Agent: Microsoft-Entourage/10.0.0.1513
Date: Fri, 08 Mar 2002 13:27:50 +0100
Subject: Re: pb avec l'instruction free (lang c) et VM
From: Éric Lévénez <eric@levenez.com>
Newsgroups: fr.comp.os.vms,fr.comp.lang.c
Message-ID: <B8AE6CD6.C4EA%eric@levenez.com>
References: <8acca07407d559fa468961076df6b9b8.76015@mygate.mailgate.org>
Mime-version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit
Lines: 25
Organization: Guest of ProXad - France
NNTP-Posting-Date: 08 Mar 2002 13:27:51 MET
NNTP-Posting-Host: 80.8.55.78
X-Trace: 1015590471 news1-2.free.fr 21230 80.8.55.78
X-Complaints-To: abuse@proxad.net