在多线程程序中使用循环缓冲区。
循环缓冲区经常用于设备驱动程序中。
Circular buffers show up reasonably often in device drivers.
这个循环的、内存中的缓冲区称为循环缓冲区。
与传统的文件日志记录机制相比,循环缓冲区提供了下列优势。
A ring buffer provides the following advantages over the traditional file logging mechanism.
图1显示了将两个条目写入到循环缓冲区后该缓冲区的状态。
Figure 1 shows the states of a ring buffer when two entries of a log are written into it.
通过使用内存操作代替文件操作,循环缓冲区使得日志记录的效率更高。
A ring buffer makes logging efficient by using memory operations in place of file operations.
特别是网络适配器,经常使用循环缓冲区来与处理器交换数据包。
Networking adaptors, in particular, often use circular buffers to exchange data (packets) with the processor.
清单4和清单5显示了对循环缓冲区写入数据并且将其内容转储到文件的示例。
Listing 4 and Listing 5 show samples of writing the data to a ring buffer and dumping its contents to file.
这种统计信息存储在一个循环缓冲区中,DBA可以设置该缓冲区的大小。
The statistical information is stored in a circular buffer, which the DBA can resize.
有时,当其他传统的日志记录方法失败时,可以使用循环缓冲区日志记录。
Sometimes ring buffer logging can come to the rescue when other traditional logging methods fail.
因为您覆盖了循环缓冲区中以前的内容,所以在完成该操作后,您将丢失以前的数据。
Since you are overwriting the previous contents in a ring buffer, you lose data by doing so.
本文设计了一种循环缓冲区,能够正确而有效的实现对参考帧队列的管理和维护。
The loop buffer in this paper can achieve the management of reference frame list correctly and efficiently.
这个部分介绍了在多线程应用程序中使用循环缓冲区启用日志记录时需要考虑的一些重要方面。
This section discusses some important points to consider when using a ring buffer to enable logging in a multi-threaded application.
人们可以通过简单的分配一块内存,小心地维护指向其的指针来实现一个循环缓冲区。
One could simply implement a circular buffer by allocating a chunk of memory, and maintaining pointers.
环形缓冲区是一个先进先出的循环缓冲区,可以向通信程序提供对缓冲区的互斥访问。
Ring buffer is a FIFO buffer of the cycle can be provided to the communication program of the mutually exclusive access to the buffer zone.
循环缓冲区好处是:使共享资源的线程的等待时间减到最小,并使他们的平均操作速度相同。
Circular buffer benefits are: to make a thread of Shared resources to minimize the waiting time, make them the same as the average operating speed.
循环缓冲区日志记录由一个固定大小的内存缓冲区构成,进程使用这个内存缓冲区进行日志记录。
Ring buffer logging consists of a fixed size of allocated memory buffer that is used by the process for logging.
本文讨论了循环缓冲区的一些常见实现,并对多线程程序中循环缓冲区的启用机制提出了一些观点。
This article discusses common implementations for ring buffer and proposes some ideas for enabling a ring buffer mechanism in multi-threaded programs.
循环缓冲区是一种用于应用程序的日志记录技术,它可以将相关的数据保存在内存中,而不是每次都将其写入到磁盘上的文件中。
A ring buffer is a logging technique for applications whereby the relevant data to be logged is kept in memory instead of writing it to a file on a disk every time.
首先注意,当缓冲区用尽时,可能要做许多不必要的工作,因为对于每个循环迭代都要处理两个缓冲区。
First of all, notice that you are potentially doing a lot of unnecessary work when the buffer runs out, since you are processing two buffers for each loop iteration.
那些逻辑日志缓冲区以循环方式起作用,以确保将获得的每一条逻辑日志记录都被刷新到磁盘中。
Those logical-log buffers are operating in the circular manner to ensure every logical log record got is flushed to disk.
然后再将寄存器127用作循环计数器,将寄存器126用作基指针,并在每个值上执行convert _ to_upper,直到到达缓冲区的底部为止。
You then use register 127 as your loop counter and register 126 as your base pointer, and perform convert_to_upper on each value until you get to the end of the buffer.
循环检查选择,将绝对文件名添加到字符串缓冲区。
Iterate though it, adding the absolute file names to a string buffer.
在初始化IDS时,它创建了两个物理日志缓冲区,而它们与逻辑日志缓冲区一样,以循环方式运作。
When IDS initializes, it creates two physical-log buffers and they are operating in a circular manner as logical-log buffers.
Memknobs分配一个固定大小的缓冲区,循环遍历缓冲区页面,写到每一页上。
Memknobs allocates a fixed-sized buffer and loops through that buffer's pages, writing to each one.
内部缓冲区的使用多采用循环方式,将数据存储到文本文档中。
The internal buffer area usually adopts cycle to store data in text document.
这个缓冲区是循环使用的,当满了的时候,会丢弃老的记录。
This buffer is circular and, when full, discards the oldest records.
这个缓冲区是循环使用的,当满了的时候,会丢弃老的记录。
This buffer is circular and, when full, discards the oldest records.
应用推荐