Welcome, Guest. Please login or register.

Author Topic: Best and fast way to AllocMem within an interrupt :Semaphores ?  (Read 7420 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Slightly off-topic

Does anybody have any performance statistics for the different memory allocation functions supported by exec?

I'm interested in the time taken to allocate/deallocate as a function of allocation size, for each method*


*I'm fully aware that this would likely change as memory becomes fragmented.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Best and fast way to AllocMem within an interrupt :Semaphores ?
« Reply #1 on: November 23, 2006, 08:40:07 PM »
Presumably then, they all have at least O(N) cost as a function of the number of nodes in the free memory list?
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Best and fast way to AllocMem within an interrupt :Semaphores ?
« Reply #2 on: November 23, 2006, 09:30:50 PM »
I'm interested in all of this as I weigh up the cost of writing my own custom allocator routines versus a basic wrapper for the memory pool allocation scheme.
int p; // A