Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #3660

Delphi and FreePascal MemPool for for real-time systems was updated version 1.01

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Ramine <toto@toto.net>
Newsgroups comp.programming.threads
Subject Delphi and FreePascal MemPool for for real-time systems was updated version 1.01
Date Tue, 14 Mar 2017 10:46:14 -0400
Organization A noiseless patient Spider
Lines 69
Message-ID <oa8vic$ddg$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 14 Mar 2017 14:43:25 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="2c1672044b7ab1d7154d7a847c316e50"; logging-data="13744"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//UOdMw6SIW781QhhPmzDH"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
X-Mozilla-News-Host news://news.eternal-september.org:119
Cancel-Lock sha1:pCxwzLXLLnuSaE+Oboo0DkRy7L4=
Xref csiph.com comp.programming.threads:3660

Show key headers only | View raw


Hello,


Delphi and FreePascal MemPool for for real-time systems was updated 
version 1.01

Description:

Real-Time Memory Management

In Delphi and FreePascal, memory management is normally performed using 
getmem,allocmem, freemem, reallocmem, etc. The run-time system's heap 
offers great flexibility and efficiency, but it cannot fulfil real-time 
requirements. The run-time requirements are non-deterministic. In 
addition, they may require blocking task switches, which makes them 
unusable for interrupt handlers.

MemPool using generics offers memory management with real-time 
capabilities through Memory Pools. A Memory Pool is an isolated heap 
with data buffers as objects of equal size. Any number of memory pools 
can exist simultaneously. A pool is initialized once and allocated a 
certain number of buffers as objects. Thereafter, buffers as objects can 
be allocated and deallocated from the pool under real-time conditions.

How to use it?

The parameters of the constructor are:

The first parameter is the number of items and the second parameter is a 
boolean parameter that will tell
MemPool to grow or not, if it is set to true it will grow,
set it to false for real-time systems, if you don't pass any parameter, 
the number of items will be set to 200 and the MemPool will not grow and 
thus it will be set for real-time systems.

The New() method returns a reference to the object.

The Return() method returns the reference to the object to the stack.

Please look at the test.pas example to learn how to use MemPool.

You can use it with Delphi 2 and up on the following RTOS:

Win32 API Compatible RTOS for 32/64-bit x86 Embedded Systems
On Time's royalty-free hard real-time embedded operating system for 
32/64-bit x86 CPUs implements a Windows subset kernel in only 16k of 
memory. It provides about 400 Win32 API functions and can load Windows DLLs.

Read more here:

http://www.on-time.com/rtos-32.htm

http://www.on-time.com/rttarget-32.htm

Language: FPC Pascal v2.2.0+ / Delphi 2+:

http://www.freepascal.org/


You can download it from:

https://sites.google.com/site/aminer68/mempool-for-realtime-systems


Thank you,
Amine Moulay Ramdane.


Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

Delphi and FreePascal MemPool for for real-time systems was updated version 1.01 Ramine <toto@toto.net> - 2017-03-14 10:46 -0400

csiph-web