Re: Win32 and fsync()

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Win32 and fsync()
Дата
Msg-id 303E00EBDD07B943924382E153890E5434A908@cuthbert.rcsinc.local
обсуждение исходный текст
Ответ на Win32 and fsync()  ("Dann Corbit" <DCorbit@connx.com>)
Список pgsql-hackers
I think the fopen or _open family of functions all map directly to the
win32 API.  They add a little cruft, which generally makes using them
pointless, because you have less control over security, caching, and
other such things when opening the file.  There is the slight overhead
of the extra call, and the conversion of the C handle to the win32
handle.  However, all you get with the api is readfile() and
writefile(), which means workhorses like fprintf() and especially
fgets() and must be reimplemented (in lieu of using the C++ runtime).

> MS has always shipped the source code to their standard libraries on
the
> CD.  However, the compiler source remains closed.  This seems
> insignificant, but sometimes functions are totally inlined within the
> compiler (e.g. math functions like sin() and exp()).

They have a special calling convention __dllspec(naked), which strips
the function prolog and epilog and allows you to write your own in
assembly.  You can use that to write very fast functions when you don't
trust the optimizer to inline your functions.  I think your are correct
some of the math functions are written this way.

Merlin


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: PGP signing releases
Следующее
От: Bruce Momjian
Дата:
Сообщение: [GENERAL] O'Reilly call for papers