MINOR: shctx: Add a maximum object size parameter.
This patch adds a new parameter to shctx_init() function to be used to
limit the size of each shared object, -1 value meaning "no limit".
diff --git a/include/proto/shctx.h b/include/proto/shctx.h
index 13e00c7..594a81d 100644
--- a/include/proto/shctx.h
+++ b/include/proto/shctx.h
@@ -31,7 +31,8 @@
#endif
#endif
-int shctx_init(struct shared_context **orig_shctx, int maxblocks, int blocksize, int extra, int shared);
+int shctx_init(struct shared_context **orig_shctx,
+ int maxblocks, int blocksize, int maxobjsz, int extra, int shared);
struct shared_block *shctx_row_reserve_hot(struct shared_context *shctx,
struct shared_block *last, int data_len);
void shctx_row_inc_hot(struct shared_context *shctx, struct shared_block *first);
diff --git a/include/types/shctx.h b/include/types/shctx.h
index 186f736..53dca3f 100644
--- a/include/types/shctx.h
+++ b/include/types/shctx.h
@@ -40,6 +40,7 @@
struct list avail; /* list for active and free blocks */
struct list hot; /* list for locked blocks */
unsigned int nbav; /* number of available blocks */
+ int max_obj_size; /* maximum object size. */
void (*free_block)(struct shared_block *first, struct shared_block *block);
short int block_size;
unsigned char data[0];