On 11/02/2017 02:10 PM, Charles Kiorpes wrote:
> On Wed, Nov 1, 2017 at 4:58 PM, Philippe Gerum <[email protected]> wrote:
>> Good catch. However, some APIs may need to create private heaps along with a 
>> shared main heap, so we can't disable the init entirely. We can reduce the 
>> impact of creating the temporary heap in the shared case though. Could you 
>> try this alternative approach and let me know if that works for you?
> 
> Ah, ok.  Reducing the impact makes sense.
> 
> I did some testing with the provided patch.  I was seeing a segfault
> in init_memory_pool(), because heapobj_pkg_init_private() passes
> __copperplate_setup_data.mem_pool into init_memory_pool(), and also
> uses that value to calculate the tlsf_pool_overhead.  Changing these
> operations to use the reduced pool size eliminated the segfault.
> Here's a modified version that makes sure that the variable pool size
> is propagated throughout the function:
> 
> diff --git a/lib/copperplate/heapobj-tlsf.c b/lib/copperplate/heapobj-tlsf.c
> index e24db15..3709852 100644
> --- a/lib/copperplate/heapobj-tlsf.c
> +++ b/lib/copperplate/heapobj-tlsf.c


Ok, let's merge this. Could you send back a complete patch formatted
with "git format-patch"? TIA,

-- 
Philippe.

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to