From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Mike Mascari <mascarim(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] What is nameout() for? |
Date: | 1999-11-07 20:48:09 |
Message-ID: | 199911072048.PAA14933@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Actually, I have 'C' question regarding the above code. Where does the
> "-" live in RAM? Does the compiler generated a data hunk such that this
> string will be apart of the final executable and each invocation of this
> routine would result in a pointer to that 'global' location being
> returned?
> Or does it allocate the memory for, and initialize, the "-" on the stack?
> If so, isn't returning a "-" a dangerous act?
>
> In fact, isn't returning a "-" dangerous either way without the
> protoype being:
One copy, usually in the text segment because it is ready-only.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Damond Walker | 1999-11-07 21:55:26 | Re: [HACKERS] psql and 6.5.3 |
Previous Message | Don Baccus | 1999-11-07 20:47:51 | Re: [HACKERS] What is nameout() for? |