Blender Git Commits

Blender Git "id-ensure-unique-memory-address" branch commits.

February 28, 2020, 09:45 (GMT)
Merge branch 'master' into id-ensure-unique-memory-address
February 28, 2020, 09:45 (GMT)
Merge branch 'id-ensure-unique-memory-address' of git.blender.org:blender into id-ensure-unique-memory-address
February 26, 2020, 14:02 (GMT)
Ensure IDs get unique memory addresses withing q given editing session.

Disclaimer: this should be considered as an engeneering, explanatory patch.

Rational: for undo work, we are now manipulating IDs from potentially many different 'memory realms' (in contrast to current undo system, where, since we always reallocate the whole main database at each undo step, we only ever have to deal with two, the old one from the memfile, and the new one from re-read data from that memfile).

So far, new undo system has used ID names-based search to remap old to new pointers, but this is slower, less safe, and forces us to do full undo barrier e.g. when renaming an ID.

Idea of this patch is instead to ensure that within a given editing session, we never ever allocate a data-block at the same address twice. That way, we can consider ID pointers as valid UIDs withing that scope, and use their values to handle remapping in udo steps even in case an ID has had several memory addresses in the history of the editing session.

This patches does two things:
# Add a way to ensure a newly allocated ID gets a memory address never used before for any ID.
# Store the history of all memory addresses ever used by a given ID.

Note that point 1 above is currently using a fairly simple and naive solution, but also quiet innefficient (just allocating again and again until we get a 'free' address), we can imagine a much more efficient solution if we go deeper in MEM_ allocator system itself. Not sure if it is worth it though, as with new undo system actual re-allocation of a same ID at a different address should be fairly rare (i.e. history of used/forbidden addresses should remain quiet short).

Differential Revision: https://developer.blender.org/D6937
February 26, 2020, 13:15 (GMT)
Merge branch 'master' into id-ensure-unique-memory-address
February 26, 2020, 11:48 (GMT)
Cleanup; add missing static statement.
February 26, 2020, 11:19 (GMT)
Rework a bit re-allocating code, add a lookup utils for history memaddresses.
February 25, 2020, 15:18 (GMT)
Merge branch 'master' into id-ensure-unique-memory-address
February 21, 2020, 15:48 (GMT)
Minor fixes/cleanup.
February 21, 2020, 14:49 (GMT)
Rework the whole unique ID system to also store ID addresses history in Main's mapping.

In the end, since this is a runtime/editing session data only, makes
more sense to store it here than in ID struct itself. And it's probably
also more efficient to handle.
February 20, 2020, 13:24 (GMT)
id-unique system: add also realloc utils.
February 20, 2020, 11:17 (GMT)
Merge branch 'master' into id-ensure-unique-memory-address
February 19, 2020, 13:08 (GMT)
Merge branch 'readfile-rework-refcount-handling' into id-ensure-unique-memory-address
February 19, 2020, 13:07 (GMT)
Merge branch 'master' into readfile-rework-refcount-handling
February 19, 2020, 11:49 (GMT)
Merge branch 'master' into readfile-rework-refcount-handling
February 19, 2020, 09:30 (GMT)
get rid of all remaining usage of `newlibadr_us` in readfile code.

Old deprecated IPOs data-blocks are not refcounted at all anymore,
however that should not be an issue since after doversion we get rid of
them anyway.
February 19, 2020, 09:17 (GMT)
Merge branch 'master' into readfile-rework-refcount-handling
February 18, 2020, 17:35 (GMT)
Merge branch 'readfile-rework-refcount-handling' into id-ensure-unique-memory-address
February 18, 2020, 17:27 (GMT)
Merge branch 'master' into readfile-rework-refcount-handling
February 18, 2020, 14:49 (GMT)
Remove usercount handling from ui stuff in reafile as well.
February 18, 2020, 14:39 (GMT)
Fix bad placement of ID refcount recomputation in readfile.
By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021