]> git.sesse.net Git - vlc/commitdiff
Document object memory layoyt
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 30 Mar 2008 08:42:52 +0000 (11:42 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 30 Mar 2008 08:43:52 +0000 (11:43 +0300)
src/misc/objects.c

index 0bfca7c2272f6392ecb4f29cebdfee05a657e281..77c58762ee1db1b87a5e2d808bcef0806fb98608 100644 (file)
@@ -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;