vm_size_t size,
vm_offset_t table);
+#define it_entries_reallocable(its) \
+ ((its)->its_size * sizeof(struct ipc_entry) >= PAGE_SIZE)
+
#define it_entries_alloc(its) \
((ipc_entry_t) \
- ipc_table_alloc(round_page( \
- (its)->its_size * sizeof(struct ipc_entry))))
-
-#define it_entries_reallocable(its) \
- ((its)->its_size * sizeof(struct ipc_entry) \
- >= PAGE_SIZE)
+ ipc_table_alloc(it_entries_reallocable(its) ? \
+ round_page((its)->its_size * sizeof(struct ipc_entry)) : \
+ (its)->its_size * sizeof(struct ipc_entry) \
+ ))
#define it_entries_realloc(its, table, nits) \
((ipc_entry_t) \
))
#define it_entries_free(its, table) \
- ipc_table_free( \
- round_page((its)->its_size * sizeof(struct ipc_entry)), \
+ ipc_table_free(it_entries_reallocable(its) ? \
+ round_page((its)->its_size * sizeof(struct ipc_entry)) : \
+ (its)->its_size * sizeof(struct ipc_entry), \
(vm_offset_t)(table) \
)