Lines Matching refs:map_ptr
225 void *map_ptr; /* where it is currently mapped */ member
890 if (tdb->map_ptr) { in tdb_write()
891 memcpy(off + (char *)tdb->map_ptr, buf, len); in tdb_write()
920 if (tdb->map_ptr) { in tdb_read()
921 memcpy(buf, off + (char *)tdb->map_ptr, len); in tdb_read()
949 if (tdb->map_ptr) { in tdb_next_hash_chain()
951 if (0 != *(u32 *)(TDB_HASH_TOP(h) + (unsigned char *)tdb->map_ptr)) { in tdb_next_hash_chain()
973 if (tdb->map_ptr) { in tdb_munmap()
974 int ret = munmap(tdb->map_ptr, tdb->real_map_size); in tdb_munmap()
980 tdb->map_ptr = NULL; in tdb_munmap()
991 tdb->map_ptr = mmap(NULL, tdb->map_size, in tdb_mmap()
999 if (tdb->map_ptr == MAP_FAILED) { in tdb_mmap()
1001 tdb->map_ptr = NULL; in tdb_mmap()
1007 tdb->map_ptr = NULL; in tdb_mmap()
1010 tdb->map_ptr = NULL; in tdb_mmap()
1090 char *new_map_ptr = (char *)realloc(tdb->map_ptr, in tdb_expand()
1096 tdb->map_ptr = new_map_ptr; in tdb_expand()
1174 if ((tdb->transaction == NULL) && (tdb->map_ptr != NULL)) { in tdb_parse_data()
1182 data.dptr = offset + (unsigned char *)tdb->map_ptr; in tdb_parse_data()
1756 if (tdb->map_ptr) { in transaction_sync()
1758 if (msync(moffset + (char *)tdb->map_ptr, in transaction_sync()
3744 tdb->map_ptr = (char *)newdb; in tdb_new_database()
3830 tdb->map_ptr = NULL; in tdb_open_ex()
3988 if (tdb->map_ptr) { in tdb_open_ex()
3990 SAFE_FREE(tdb->map_ptr); in tdb_open_ex()
4027 if (tdb->map_ptr) { in tdb_close()
4029 SAFE_FREE(tdb->map_ptr); in tdb_close()