Ravenbrook / Projects / Memory Pool System / Master Product Sources

Memory Pool System Project


Example Code

Richard Kistruck, Ravenbrook Limited, 2006-04-10

1. Introduction

This is the catalogue of example code for the Memory Pool System product.

The example code shows you how to write code that uses the MPS. (In other words, how to use facilities in "mps.h").

The simplest example — "hello-world" — gets you started using the MPS to allocate some memory to store and print the text "hello, world".

This document is not confidential. The readership of this document is developers of client code that uses the MPS interface.

Related documents:

2. Example Code

hello-world/ simplest call to mps_alloc() — START HERE!

A. References

B. Document History

2006-04-10 RHSK Created (based on ../manual/index.txt).

C. Copyright and License

This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Redistributions in any form must be accompanied by information on how to obtain complete source code for this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.


$Id: //info.ravenbrook.com/project/mps/version/1.107/example/index.html#1 $

Ravenbrook / Projects / Memory Pool System / Master Product Sources