Project

General

Profile

Actions

Feature #5900

open

153: Correct allocation of identifiers using IDR layer

Added by Vadim Mutilin almost 9 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Start date:
05/06/2015
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

Summary

The module should not delete IDRs which were not initialized and delete IDRs which were already deleted.

Memory allocation, free and find should be done only for already initialized IDRs.

At the end the module should delete with idr_destroy all previously IDRs.

It is allowed to skip idr_destroy for the IDRs which were not changed (i.e. the objects were not allocated and removed).

Description

IDR is initialized with the macro DEFINE_IDR(name) or function void idr_init(struct idr *).
The memory for IDR objects are allocated by int idr_alloc(struct idr *, void *, int, int, gtp_t).
The search for IDR objects is performed with void *idr_find(struct idr *, int).
The memory for an object is free with idr_remove(struct idr *, int).
The IDR is deleted with void idr_destroy(struct idr *).

Links
Sample bugfix c2b4988

No data to display

Actions

Also available in: Atom PDF