1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Added some error handling in IB memory type

This commit is contained in:
Dennis Potter 2018-07-07 12:56:08 +02:00
parent e2061e58fc
commit e16644b0e9

View file

@ -55,6 +55,9 @@ static struct memory_allocation * memory_ib_alloc(struct memory_type *m, size_t
ma->parent = mi->parent->alloc(mi->parent, len + sizeof(struct ibv_mr *), alignment);
ma->address = ma->parent->address;
if(!mi->pd)
error("Protection domain is not registered!");
ma->ib.mr = ibv_reg_mr(mi->pd, ma->address, ma->length, IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);
if(!ma->ib.mr) {
mi->parent->free(mi->parent, ma->parent);