---
name: "ACE_Static_Allocator"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Static_Allocator"
---

# ACE\_Static\_Allocator(3)

Defines a class that provided a highly optimized memory management scheme for allocating memory statically.

## NAME

ACE\_Static\_Allocator -  Defines a class that provided a highly optimized memory management scheme for allocating memory statically.

## SYNOPSIS

```
#include <ace/Malloc_T.h>
template<size_t POOL_SIZE>
class ACE_Static_Allocator : public ACE_Static_Allocator_Base
{
  public:
    inline ACE_Static_Allocator (void);
  private:
    char pool_[POOL_SIZE];
};
```

## DESCRIPTION

This class allocates a fixed-size POOL\_SIZE of memory and uses the ACE\_Static\_Allocator\_Base class implementations of malloc and calloc to optimize memory allocation from this pool.

## PUBLIC MEMBERS

```
inline ACE_Static_Allocator (void);
```

This function *must* be inlined!!!

## PRIVATE MEMBERS

```
char pool_[POOL_SIZE];
```

Pool contents.

## AUTHOR

Doug Schmidt and Irfan Pyarali

## LIBRARY

ace
