Article View: es.comp.os.linux.programacion
Article #11801Re: Segmentation fault
From: Jesús Carrete Montaña
Date: Sun, 07 Oct 2001 08:57
Date: Sun, 07 Oct 2001 08:57
32 lines
2306 bytes
2306 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "X" == X <x@xxx.com> writes:
X> Por ejemplo, pasan a una funci�n un puntero, que apunta a una
X> zona de la memoria ya alojada. La funci�n no tiene m�s
X> datos. �C�mo saber, a partir de ese puntero, y solamente ese
X> puntero, cuanta memoria hay alojada en la direcci�n a la que
X> apunta?
No es posible, de hecho ese tipo de funciones suelen tener
despues del par�metro puntero un par�metro entero especificando el
tama�o.
X> Digo yo que tiene que haber alguna manera de saberlo, sin�,
X> �c�mo funciona free?
free usar� alg�n tipo de �ndice de reservas que ir� grabando
malloc(). No s� exactamente el sistema que usa, pero en caso de que se
pudiese usar desde el c�digo normal (que lo dudo) seguro que no ser�a
portable.
Un saludo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQE7wBj0fUtQQKOnZ1IRArnYAKCFx/dB93AM90OWsvJzD1eg7anBTQCgpNoH
0xx0sYiETZ6Plq7t2XGNByY=
=jAH3
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<87zo736d55.fsf@relativistic.ion>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!119-coru-x8.libre.retevision.ES!not-for-mailReferences:
<lnhip9.bq.ln@xxx.com> <87lmirknsk.fsf@meltdown.ion> <44ejp9.3f1.ln@xxx.com> <878zeqyp6r.fsf@relativistic.ion> <e8gnp9.ku.ln@xxx.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,b3c8decf211f42e0 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-10-07 02:00:20 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!119-coru-x8.libre.retevision.ES!not-for-mail From: kuantiko@escomposlinux.org (Jesús Carrete Montaña) Newsgroups: es.comp.os.linux.programacion Subject: Re: Segmentation fault Date: 07 Oct 2001 10:57:26 +0200 Lines: 32 Sender: kuantiko@relativistic.ion Message-ID: <87zo736d55.fsf@relativistic.ion> References: <lnhip9.bq.ln@xxx.com> <87lmirknsk.fsf@meltdown.ion> <44ejp9.3f1.ln@xxx.com> <878zeqyp6r.fsf@relativistic.ion> <e8gnp9.ku.ln@xxx.com> NNTP-Posting-Host: 119-coru-x8.libre.retevision.es (62.83.53.119) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1002445217 20427407 62.83.53.119 (16 [54696]) X-Orig-Path: relativistic.homeip.net!nobody User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7