README 990 B

1234567891011121314151617181920212223
  1. $Id$
  2. Wrapper functions for regcomp, regexec, regfree, and regerror using shared
  3. memory allocators instead of libc malloc/realloc/free. The original functions
  4. are prefixed with "shm_".
  5. The regular expression compiled with shm_regcomp() can be used with shm_regexec()
  6. simultaneously by multiple processes without locking, because regexec has its own
  7. internal locks. It can be later on freed with shm_regfree() when the expression
  8. is no longer used. Note however that
  9. 1) shm_regexec allocates shared memory for the pattern buffer when it is successfully
  10. called for the first time.
  11. 2) shm_regexec temporary allocates and deallocates memory for storing the registers
  12. for the pmatch array runtime if nmatch and pmatch parameters are not 0. This is
  13. done also in shared memory, therefore use the shared memory wrappers for
  14. regular expression based search-and-replace only if really necessary.
  15. See 'man regex' for the usage and parameters of the functions.
  16. Supported only with GNU C library.