函数源码 |
Source File:mm\kmemleak.c |
Create Date:2022-07-27 17:56:45 |
首页 | Copyright©Brick |
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | /* * Update an object's references. object->lock must be held by the caller. */ static void update_refs( struct kmemleak_object *object) { if (!color_white(object)) { /* non-orphan, ignored or new */ return ; } /* * Increase the object's reference count (number of pointers to the * memory block). If this count reaches the required minimum, the * object's color will become gray and it will be added to the * gray_list. */ object->count++; if (color_gray(object)) { /* put_object() called when removing from gray_list */ WARN_ON(!get_object(object)); list_add_tail(&object->gray_list, &gray_list); } } |