
![]() |
Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
|
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[216.73.216.60] |
![]() |
|
Страницы: (2) 1 [2] все ( Перейти к последнему сообщению ) |
![]() |
Сообщ.
#16
,
|
|
не только памяти, там еще выравнивание по размеру сектора...
|
Сообщ.
#17
,
|
|
|
Цитата но еще один ньюанс у меня возник (с FILE_FLAG_NO_BUFFERING) - получаю Invalid Parameter Ну там сказано в справке, что буфер должен быть выровнен и порции считывания/записи должны быть кратны размеру сектора. У тебя это требование соблюдено? Цитата FILE_FLAG_NO_BUFFERING Instructs the operating system to open the file with no intermediate buffering or caching. This can provide performance gains in some situations. An application must meet certain requirements when working with files opened with FILE_FLAG_NO_BUFFERING: · File access must begin at byte offsets within the file that are integer multiples of the volume's sector size. · File access must be for numbers of bytes that are integer multiples of the volume's sector size. For example, if the sector size is 512 bytes, an application can request reads and writes of 512, 1024, or 2048 bytes, but not of 335, 981, or 7171 bytes. · Buffer addresses for read and write operations must be aligned on addresses in memory that are integer multiples of the volume's sector size. One way to align buffers on integer multiples of the volume sector size is to use VirtualAlloc to allocate the buffers. It allocates memory that is aligned on addresses that are integer multiples of the operating system's memory page size. Since both memory page and volume sector sizes are powers of 2, this memory is also aligned on addresses that are integer multiples of a volume's sector size. An application can determine a volume's sector size by calling the GetDiskFreeSpace function. Rouse_ меня опередил ![]() |