PJLIB

PJLIB is an Open Source, small footprint framework library written in C for making scalable applications. It can be used in wide range of applications, from embedded systems, mobile applications, to high performance systems.

Key Features

Extreme Portability

From 16-bit, 32-bit, to 64-bit, big or little endian, single or multi-processors, wide range of operating systems, Unicode support. With or without floating point support. Multi-threading or not. With/without ANSI LIBC. Currently known to run on these platforms:

Small Footprint

PJLIB size is around 150 KB. See Footprint Optimization for more information.

Big in Performance

PJLIB has been designed to achieve highest performance, with design decisions such as own memory management, string, and network event proactor.

See Performance Optimization for more information.

No Dynamic Memory Allocations

  • alloc() is a O(1) operation.

  • no mutex is used inside alloc().

  • no free(). All chunks will be deleted when the pool is destroyed.

Rich Features

  • Operating system abstraction

  • Low and high level network I/O

  • Timer management

  • Rich data structures

  • Exception construct

  • Logging facility

  • Random and GUID generation

API Reference

Basic Types and Functions

Infrastructure

Data structure

Network

SSL/Secure Socket

SSL socket implementation on top of OpenSSL, BoringSSL, GNUTLS, and Apple’s Network framework. See:

File

Memory Management

String & Unicode

String in PJLIB is non-zero terminated, and represented with pj_str_t. A full set of API is provided to manipulate such strings.

Multithreading and Concurrency

OS Abstraction

Time and Timer

Random and GUID

Application Microframework