Re: [HACKERS] What is nameout() for?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] What is nameout() for?
Дата
Msg-id 199911072048.PAA14933@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] What is nameout() for?  (Mike Mascari <mascarim@yahoo.com>)
Список 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@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: [HACKERS] What is nameout() for?
Следующее
От: Bruce Momjian
Дата:
Сообщение: New NameStr() macro, RelationGetRelationName fixes