[vlc-devel] commit: Allocate each object variable separately ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Dec 30 16:16:20 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 30 17:01:29 2009 +0200| [edecf92c8f8c28f3145ede090cdb20294c975d32] | committer: Rémi Denis-Courmont 

Allocate each object variable separately

This reduces the amount of memory copied when creating/deleting a
variable on an object. We now use a table of pointers instead of table
of variable_t.

This also simplifies callback handling a bit as the variable_t cannot
move anymore while we wait. Earlier another thread could add or remove
another variable on the same object, thus changing the variable table.

With this change, we could also store non-serialized data (i.e.
non-movable with memcpy/memmove) directly inside variable_t.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edecf92c8f8c28f3145ede090cdb20294c975d32
---

 src/libvlc.h         |    2 +-
 src/misc/objects.c   |   13 +---
 src/misc/variables.c |  177 ++++++++++++++++++++++++--------------------------
 3 files changed, 90 insertions(+), 102 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=edecf92c8f8c28f3145ede090cdb20294c975d32



More information about the vlc-devel mailing list