Apache可移植运行库-Apr
2013-06-26 16:29:45

本站赞助商链接,请多关照。 APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。在早期的Apache版本中,应用程序本身必须能够处理各种具体操作系统平台的细节,并针对不同的平台调用不同的处理函数。采用C语言开发并在Apache协议下授权。


随着Apache的进一步开发,Apache组织决定将这些通用的函数独立出来并发展成为一个新的项目。这样APR的开发就从Apache中独立出来,而Apache仅仅是使用 APR而已。目前APR主要还是由Apache使用,不过由于APR的较好的移植性,因而一些需要进行移植的C程序也开始使用APR,开源项目比如 Flood loader tester,该项目用于服务器压力测试,不仅仅适用于Apache。Glib提供类似的功能特性,支持更多的数据结构和操作系统无关的函数,但进程间通信相关的函数要少一些(Glib缺少本地和全局锁机制以及共享内存管理)。

特点

内存管理和内存池功能
原子操作(Linearizability)
动态库处理
文件I/O
命令参数解析
锁机制(Locking)
散列表和数组
Mmap(mmap)功能
网络套接字和协议
线程,进程和互斥锁功能
共享内存功能
时间子程序
用户和组ID服务

The mission of the Apache Portable Runtime (APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.

最新版本:1.7
修复了上一个版本中的一些 bug,我们很高兴有很多来自社区的用户对该版本的贡献。详细的改进请看发行包中的 CHANGES-APR-1.4 文件。

项目主页:http://apr.apache.org/