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:
Simon Glass
2022-07-30 15:52:07 -06:00
committed by Tom Rini
parent 5063ced278
commit 72b338aa2c
2 changed files with 15 additions and 5 deletions

View File

@@ -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