dm: core: Add a note about how livetree updates work
The unflattening algorithm results in a single block of memory being allocated for the whole tree. When writing new properties, these are allocated new memory outside that block. When the block is freed, the allocated properties remain. Document how this works and the potential memory leak, as well as mentioning that updating the livetree is actually supported now. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1081,7 +1081,8 @@ int ofnode_device_is_compatible(ofnode node, const char *compat);
|
||||
* ofnode_write_prop() - Set a property of a ofnode
|
||||
*
|
||||
* Note that the value passed to the function is *not* allocated by the
|
||||
* function itself, but must be allocated by the caller if necessary.
|
||||
* function itself, but must be allocated by the caller if necessary. However
|
||||
* it does allocate memory for the property struct and name.
|
||||
*
|
||||
* @node: The node for whose property should be set
|
||||
* @propname: The name of the property to set
|
||||
|
||||
Reference in New Issue
Block a user