diff options
author | Moritz Schulte <mo@g10code.com> | 2005-10-16 08:46:06 +0000 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2005-10-16 08:46:06 +0000 |
commit | e5410dcf22dffc7f2e725a0965842fae71ecdbcf (patch) | |
tree | e658f1cccc9ac7bf44cc4b974437c13501a61f20 /src/stdmem.c | |
parent | 66721a14e67327727531f62c2881529a0d4d8bbc (diff) | |
download | libgcrypt-e5410dcf22dffc7f2e725a0965842fae71ecdbcf.tar.gz |
2005-10-16 Moritz Schulte <moritz@g10code.com>
* stdmem.c: Inserted description of the layered memory management
in Libgcrypt.
Diffstat (limited to 'src/stdmem.c')
-rw-r--r-- | src/stdmem.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/stdmem.c b/src/stdmem.c index 4243af16..e5657987 100644 --- a/src/stdmem.c +++ b/src/stdmem.c @@ -1,5 +1,5 @@ /* stdmem.c - private memory allocator - * Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 2000, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -18,6 +18,33 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +/* + * Description of the layered memory management in Libgcrypt: + * + * [User] + * | + * | + * \ / + * global.c: [MM entrance points] -----> [user callbacks] + * | | + * | | + * \ / \ / + * + * stdmem.c: [non-secure handlers] [secure handlers] + * + * | | + * | | + * \ / \ / + * + * stdmem.c: [ memory guard ] + * + * | | + * | | + * \ / \ / + * + * libc: [ MM functions ] secmem.c: [ secure MM functions] + */ + #include <config.h> #include <stdio.h> #include <stdlib.h> @@ -28,6 +55,7 @@ #include "stdmem.h" #include "secmem.h" + #define MAGIC_NOR_BYTE 0x55 #define MAGIC_SEC_BYTE 0xcc |