diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-05-08 10:13:12 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-05-08 10:13:12 -0400 |
commit | 08c4bf822a6600d36c4d9a83000e8d889fd6c1bc (patch) | |
tree | f6fb2d5b07ac423e7ac7dec8fa96e8c0ac413233 /ext | |
parent | bc25f5a82e6312ad89b57e846bc805d20f130bcc (diff) | |
download | mongo-08c4bf822a6600d36c4d9a83000e8d889fd6c1bc.tar.gz |
Replace a large paragraph on why we allocate extension structures instead
of making them static with a single line -- the big paragraph shows up in
the documentation.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/compressors/lz4/lz4_compress.c | 7 | ||||
-rw-r--r-- | ext/compressors/nop/nop_compress.c | 7 | ||||
-rw-r--r-- | ext/encryptors/nop/nop_encrypt.c | 7 | ||||
-rw-r--r-- | ext/encryptors/rotn/rotn_encrypt.c | 7 |
4 files changed, 4 insertions, 24 deletions
diff --git a/ext/compressors/lz4/lz4_compress.c b/ext/compressors/lz4/lz4_compress.c index 9939a4f8a04..6b602b3d45c 100644 --- a/ext/compressors/lz4/lz4_compress.c +++ b/ext/compressors/lz4/lz4_compress.c @@ -215,12 +215,7 @@ lz4_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config) * as the first field, allowing us to treat references to either type of * structure as a reference to the other type. * - * This could be simplified if only a single database is opened in the - * application, we could use a static WT_COMPRESSOR structure, and a - * static reference to the WT_EXTENSION_API methods, then we don't need - * to allocate memory when the compressor is initialized or free it when - * the compressor is terminated. However, this approach is more general - * purpose and supports multiple databases per application. + * Heap memory (not static), because it can support multiple databases. */ lz4_compressor->compressor.compress = lz4_compress; lz4_compressor->compressor.compress_raw = NULL; diff --git a/ext/compressors/nop/nop_compress.c b/ext/compressors/nop/nop_compress.c index 6b640adf777..ce6964be85d 100644 --- a/ext/compressors/nop/nop_compress.c +++ b/ext/compressors/nop/nop_compress.c @@ -166,12 +166,7 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config) * as the first field, allowing us to treat references to either type of * structure as a reference to the other type. * - * This could be simplified if only a single database is opened in the - * application, we could use a static WT_COMPRESSOR structure, and a - * static reference to the WT_EXTENSION_API methods, then we don't need - * to allocate memory when the compressor is initialized or free it when - * the compressor is terminated. However, this approach is more general - * purpose and supports multiple databases per application. + * Heap memory (not static), because it can support multiple databases. */ nop_compressor->compressor.compress = nop_compress; nop_compressor->compressor.compress_raw = NULL; diff --git a/ext/encryptors/nop/nop_encrypt.c b/ext/encryptors/nop/nop_encrypt.c index a4282c762ea..e3f693ad37d 100644 --- a/ext/encryptors/nop/nop_encrypt.c +++ b/ext/encryptors/nop/nop_encrypt.c @@ -162,12 +162,7 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config) * as the first field, allowing us to treat references to either type of * structure as a reference to the other type. * - * This could be simplified if only a single database is opened in the - * application, we could use a static WT_ENCRYPTOR structure, and a - * static reference to the WT_EXTENSION_API methods, then we don't need - * to allocate memory when the encryptor is initialized or free it when - * the encryptor is terminated. However, this approach is more general - * purpose and supports multiple databases per application. + * Heap memory (not static), because it can support multiple databases. */ nop_encryptor->encryptor.encrypt = nop_encrypt; nop_encryptor->encryptor.decrypt = nop_decrypt; diff --git a/ext/encryptors/rotn/rotn_encrypt.c b/ext/encryptors/rotn/rotn_encrypt.c index 5a4b0342f90..409278a0346 100644 --- a/ext/encryptors/rotn/rotn_encrypt.c +++ b/ext/encryptors/rotn/rotn_encrypt.c @@ -414,12 +414,7 @@ wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config) * as the first field, allowing us to treat references to either type of * structure as a reference to the other type. * - * This could be simplified if only a single database is opened in the - * application, we could use a static WT_ENCRYPTOR structure, and a - * static reference to the WT_EXTENSION_API methods, then we don't need - * to allocate memory when the encryptor is initialized or free it when - * the encryptor is terminated. However, this approach is more general - * purpose and supports multiple databases per application. + * Heap memory (not static), because it can support multiple databases. */ rotn_encryptor->encryptor.encrypt = rotn_encrypt; rotn_encryptor->encryptor.decrypt = rotn_decrypt; |