For a short explanation about disk space usage, see user contrib note at dba_optimize()
![]() | dba_replace说明bool dba_replace ( string key, string value, resource handle )dba_replace() replaces or inserts the entry described with key and value into the database specified by handle. 参数
![]()
samuele at removethisnorsam dot org
04-Aug-2003 07:23
For a short explanation about disk space usage, see user contrib note at dba_optimize()
jelte dot werkhoven at itfy dot com
26-Sep-2002 10:24
Not only will dba_replace add extra entries when trying to replace an existing smaller one, it will always add a new entry if the size of the value differs from the existing entry. This is probably due to the nature of the datum struct in DBM-type databases (I work with gdbm), which consist of a void pointer and a integer containing the size of the memory pointed to. Padding the value should solve this.
swain at panix dot com
07-Nov-2001 03:03
Note that if you replace an existing entry with a larger one, it will actually create a new entry and the old one is simply lost. This is a memory leak in other words.
| ![]() |