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

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

::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

    I will clarify:


void
blah(void)
{
    fubar("abcdefgh");
}


	.file	"x.c"
	.version	"01.01"
gcc2_compiled.:
.section	.rodata			<------- read only global data
.LC0:
	.ascii "abcdefgh\0"		<------- string physically here
.text
	.p2align 2,0x90
.globl blah
	.type	 blah,@function
blah:
	pushl %ebp
	movl %esp,%ebp
	subl $8,%esp
	addl $-12,%esp
	pushl $.LC0
	call fubar
	addl $16,%esp
.L2:
	leave
	ret
.Lfe1:
	.size	 blah,.Lfe1-blah
	.ident	"GCC: (GNU) 2.95.2 19991024 (release)"


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?200003240747.XAA09124>