Emap: Take (and propagate) a zeroed parameter.
Rtree needs this, and we should really treat them similarly.
This commit is contained in:
parent
182192f83c
commit
7013716aaa
@ -27,7 +27,7 @@ struct emap_full_alloc_ctx_s {
|
|||||||
|
|
||||||
extern emap_t emap_global;
|
extern emap_t emap_global;
|
||||||
|
|
||||||
bool emap_init(emap_t *emap);
|
bool emap_init(emap_t *emap, bool zeroed);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grab the lock or locks associated with the edata or edatas indicated (which
|
* Grab the lock or locks associated with the edata or edatas indicated (which
|
||||||
|
@ -22,9 +22,9 @@ enum emap_lock_result_e {
|
|||||||
typedef enum emap_lock_result_e emap_lock_result_t;
|
typedef enum emap_lock_result_e emap_lock_result_t;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
emap_init(emap_t *emap) {
|
emap_init(emap_t *emap, bool zeroed) {
|
||||||
bool err;
|
bool err;
|
||||||
err = rtree_new(&emap->rtree, true);
|
err = rtree_new(&emap->rtree, zeroed);
|
||||||
if (err) {
|
if (err) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1572,7 +1572,8 @@ malloc_init_hard_a0_locked() {
|
|||||||
if (base_boot(TSDN_NULL)) {
|
if (base_boot(TSDN_NULL)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (emap_init(&emap_global)) {
|
/* emap_global is static, hence zeroed. */
|
||||||
|
if (emap_init(&emap_global, /* zeroed */ true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (extent_boot()) {
|
if (extent_boot()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user