在支持内存保护的平台上,在log buffer的两端有guard pages,这是一个内存保护单元(memory protection unit),大小通常为4K or 8K.在实例启动时,oracle使用mprotect() system call设置guard pages的permissions为PROT_NONE.这样,任何试图读写guard pages,将返回EACCES error and cause the process to abort,即使是oracle。
guard pages目的是减少log buffer corruption损坏的风险。Oracle bug, hardware memory error or hacker stack corruption attack都有可能导致pointer or offset损坏,以至于数据拷贝到内存不正确的位置。guard pages阻止了这样的损坏。
The following listing shows that the guard pages are included in the size of the "Redo Buffers" as shown in V$SGA, but are excluded from the size of the "log_buffer" as shown in V$SGASTAT. Oracle DBAs are often puzzled by this discrepancy.
SQL> select name, value from v$sga where name = 'Redo Buffers';
NAME VALUE -------------------- ---------- Redo Buffers 532480
SQL> select name, bytes from v$sgastat where name = 'log_buffer' and pool is null;
NAME BYTES -------------------------- ---------- log_buffer 524288 |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9599/viewspace-472958/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9599/viewspace-472958/