ICU-5426 Reduce size of ucol_openRules mallocs (less than 1/4th the size)
X-SVN-Rev: 20527
This commit is contained in:
parent
b6d25ceffc
commit
0554859f94
@ -141,10 +141,8 @@ uprv_uca_initTempTable(UCATableHeader *image, UColOptionSet *opts, const UCollat
|
||||
goto allocation_failure;
|
||||
}
|
||||
uprv_memset(t->expansions, 0, sizeof(ExpansionTable));
|
||||
/*t->mapping = ucmpe32_open(UCOL_SPECIAL_FLAG | (initTag<<24), UCOL_SPECIAL_FLAG | (SURROGATE_TAG<<24), UCOL_SPECIAL_FLAG | (LEAD_SURROGATE_TAG<<24), status);*/
|
||||
/*t->mapping = utrie_open(NULL, NULL, 0x100000, UCOL_SPECIAL_FLAG | (initTag<<24), TRUE); // Do your own mallocs for the structure, array and have linear Latin 1*/
|
||||
|
||||
t->mapping = utrie_open(NULL, NULL, 0x100000,
|
||||
t->mapping = utrie_open(NULL, NULL, UCOL_ELM_TRIE_CAPACITY,
|
||||
UCOL_SPECIAL_FLAG | (initTag<<24),
|
||||
UCOL_SPECIAL_FLAG | (supplementaryInitTag << 24),
|
||||
TRUE); // Do your own mallocs for the structure, array and have linear Latin 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2000-2005, International Business Machines
|
||||
* Copyright (C) 2000-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -35,6 +35,14 @@
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
/* This is the maximum trie capacity for the mapping trie.
|
||||
Due to current limitations in genuca and the design of UTrie,
|
||||
this number can't be more than 256K.
|
||||
As of Unicode 5, it currently could safely go to 128K without
|
||||
a problem. Normally, less than 32K are tailored.
|
||||
*/
|
||||
#define UCOL_ELM_TRIE_CAPACITY 0x30000
|
||||
|
||||
typedef struct {
|
||||
uint32_t *CEs;
|
||||
int32_t position;
|
||||
|
Loading…
Reference in New Issue
Block a user