Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2000 23:44:14 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Chad David <davidc@acns.ab.ca>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: vm_await()
Message-ID:  <200003240744.XAA09084@apollo.backplane.com>
References:   <Pine.BSF.4.21.0003240045150.12954-100000@lodge.guild.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:In the case of malloc(), wmesg is set to type->ks_shortdesc, which is
:not part of the current functions stack, so it is safe for malloc
:to return.  Unless I am wrong, "string", is an automatic variable, and
:when the current function returns it is no longer vaild.
:
:With tsleep() this would never be a problem as tsleep() blocks.
:
:Chad

    No.  "string" is a 'const char *' -- it is global read-only data.  
    It is most certainly not an automatic function variable.

					-Matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003240744.XAA09084>