[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] include: fix the embedded type definitions in memory_obj
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/2] include: fix the embedded type definitions in memory_object.defs |
Date: |
Mon, 26 May 2014 00:08:13 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Mon 26 May 2014 00:03:34 +0200, a écrit :
> In order to use MIG translation functions to lookup memory objects,
> preprocessor macros have been introduced into the definition of
> memory_object_t in 50cc5152.
>
> The procedure definitions contain inlined type definitions in order to
> change the type of the argument in question (i.e. to make it
> polymorphic). The inline definitions however lack the destructor
> function, leading to reference leaks when a reference is acquired in
> the intran function.
Ack!
> * include/mach/memory_object.defs: Add the destructor functions to the
> inlined type definitions.
> ---
> include/mach/memory_object.defs | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs
> index 0ed8dbc..1ae36aa 100644
> --- a/include/mach/memory_object.defs
> +++ b/include/mach/memory_object.defs
> @@ -93,6 +93,9 @@ simpleroutine memory_object_terminate(
> #ifdef MEMORY_OBJECT_INTRAN
> intran: MEMORY_OBJECT_INTRAN
> #endif
> +#ifdef MEMORY_OBJECT_DESTRUCTOR
> + destructor: MEMORY_OBJECT_DESTRUCTOR
> +#endif
> ;
> #if SEQNOS
> msgseqno seqno : mach_port_seqno_t;
> @@ -233,6 +236,9 @@ simpleroutine memory_object_lock_completed(
> #ifdef MEMORY_OBJECT_INTRAN
> intran: MEMORY_OBJECT_INTRAN
> #endif
> +#ifdef MEMORY_OBJECT_DESTRUCTOR
> + destructor: MEMORY_OBJECT_DESTRUCTOR
> +#endif
> ;
> #if SEQNOS
> msgseqno seqno : mach_port_seqno_t;
> @@ -268,6 +274,9 @@ simpleroutine memory_object_supply_completed(
> #ifdef MEMORY_OBJECT_INTRAN
> intran: MEMORY_OBJECT_INTRAN
> #endif
> +#ifdef MEMORY_OBJECT_DESTRUCTOR
> + destructor: MEMORY_OBJECT_DESTRUCTOR
> +#endif
> ;
> #if SEQNOS
> msgseqno seqno : mach_port_seqno_t;
> @@ -318,6 +327,9 @@ simpleroutine memory_object_change_completed(
> #ifdef MEMORY_OBJECT_INTRAN
> intran: MEMORY_OBJECT_INTRAN
> #endif
> +#ifdef MEMORY_OBJECT_DESTRUCTOR
> + destructor: MEMORY_OBJECT_DESTRUCTOR
> +#endif
> ;
> #if SEQNOS
> msgseqno seqno : mach_port_seqno_t;
> --
> 2.0.0.rc2
>
--
Samuel
* c is away : cuisine; bouffe
<y> oh, moi je fais plutôt cuisine & bouffe en fait :)
<c> oui c'est vrai, certains font cuisine && bouffe (juste au cas où... ;-))
<y> ( cuisine && bouffe ) || restau
<N> voire ((cuisine && bouffe) || restau) & apéritif
-+- #ens-mim -+-