[vlc-devel] commit: Document object memory layoyt ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Mar 30 10:43:26 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sun Mar 30 11:42:52 2008 +0300| [42bb2a548d096f55bfbbb98421802e7c164e03f4]
Document object memory layoyt
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42bb2a548d096f55bfbbb98421802e7c164e03f4
---
src/misc/objects.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 0bfca7c..77c5876 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -102,6 +102,15 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
vlc_object_t *p_new;
vlc_object_internals_t *p_priv;
+ /* NOTE:
+ * VLC objects are laid out as follow:
+ * - first the LibVLC-private per-object data,
+ * - then VLC_COMMON members from vlc_object_t,
+ * - finally, the type-specific data (if any).
+ *
+ * This function initializes the LibVLC and common data,
+ * and zeroes the rest.
+ */
p_priv = calloc( 1, sizeof( *p_priv ) + i_size );
if( p_priv == NULL )
return NULL;
More information about the vlc-devel
mailing list