📄 enomem.so
字号:
m4_comment([$Id: enomem.so,v 1.2 2004/09/28 14:13:09 bostic Exp $])m4_ref_title(Upgrading m4_db Applications, Release 4.3: ENOMEM and DbMemoryException,, upgrade.4.3/fileopen, upgrade.4.3/repl)m4_p([dnlIn versions of m4_db before 4.3, the error m4_bold(ENOMEM) was used toindicate that the buffer in a m4_ref(Dbt) configured withm4_ref(DB_DBT_USERMEM) was too small to hold a key or data item beingretrieved. The 4.3 release adds a new error, m4_ref(DB_BUFFER_SMALL),that is returned in this case.])m4_p([dnlThe reason for the change is that the use of m4_bold(ENOMEM) wasambiguous: calls such as m4_ref(dbh_get) or m4_ref(dbc_get) could returnm4_bold(ENOMEM) either if a m4_ref(Dbt) was too small or if some resourcewas exhausted.])m4_p([dnlThe result is that starting with the 4.3 release, C applications shouldalways treat m4_bold(ENOMEM) as a fatal error. Code that checked forthe m4_bold(ENOMEM) return and allocated a new buffer should be changedto check for m4_ref(DB_BUFFER_SMALL).])m4_p([dnlIn C++ applications configured for exceptions, am4_refcxx(DbMemoryException) will continue to be thrown in both cases,and applications should check the errno in the exception to determinewhich error occurred.])m4_p([dnlIn Java applications, a m4_bold(DbMemoryException) will be thrownwhen a m4_bold(Dbt) is too small to hold a return value, and anm4_bold(OutOfMemoryError) will be thrown in all cases of resourceexhaustion.])m4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -