Changeset 1867 for trunk/src/kmk
- Timestamp:
- Oct 15, 2008, 3:28:32 AM (17 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/file.c
r1863 r1867 252 252 return f; 253 253 254 #ifndef CONFIG_WITH_ALLOC_CACHES 254 255 new = xmalloc (sizeof (struct file)); 255 256 memset (new, '\0', sizeof (struct file)); 257 #else 258 new = alloccache_calloc (&file_cache); 259 #endif 256 260 new->name = new->hname = name; 257 261 new->update_status = -1; -
trunk/src/kmk/main.c
r1864 r1867 646 646 #ifdef CONFIG_WITH_ALLOC_CACHES 647 647 struct alloccache dep_cache; 648 struct alloccache file_cache; 649 struct alloccache commands_cache; 648 650 struct alloccache nameseq_cache; 649 651 struct alloccache variable_cache; … … 655 657 { 656 658 alloccache_init (&dep_cache, sizeof (struct dep), "dep", NULL, NULL); 659 alloccache_init (&file_cache, sizeof (struct file), "file", NULL, NULL); 660 alloccache_init (&commands_cache, sizeof (struct commands), "commands", NULL, NULL); 657 661 alloccache_init (&nameseq_cache, sizeof (struct nameseq), "nameseq", NULL, NULL); 658 662 alloccache_init (&variable_cache, sizeof (struct variable), "variable", NULL, NULL); -
trunk/src/kmk/make.h
r1864 r1867 573 573 /* the alloc caches */ 574 574 extern struct alloccache dep_cache; 575 extern struct alloccache file_cache; 576 extern struct alloccache commands_cache; 575 577 extern struct alloccache nameseq_cache; 576 578 extern struct alloccache variable_cache; -
trunk/src/kmk/read.c
r1863 r1867 2298 2298 2299 2299 nextf = filenames->next; 2300 #ifndef CONFIG_WITH_ALLOC_CACHES 2300 2301 free (filenames); 2302 #else 2303 alloccache_free (&nameseq_cache, filenames); 2304 #endif 2301 2305 2302 2306 /* If it's a pattern target, then add it to the pattern-specific … … 2429 2433 if (commands_idx > 0) 2430 2434 { 2435 #ifndef CONFIG_WITH_ALLOC_CACHES 2431 2436 cmds = xmalloc (sizeof (struct commands)); 2437 #else 2438 cmds = alloccache_alloc (&commands_cache); 2439 #endif 2432 2440 cmds->fileinfo.filenm = flocp->filenm; 2433 2441 cmds->fileinfo.lineno = cmds_started; -
trunk/src/kmk/rule.c
r1863 r1867 393 393 { 394 394 r->terminal = terminal; 395 #ifndef CONFIG_WITH_ALLOC_CACHES 395 396 r->cmds = xmalloc (sizeof (struct commands)); 397 #else 398 r->cmds = alloccache_alloc (&commands_cache); 399 #endif 396 400 r->cmds->fileinfo.filenm = 0; 397 401 r->cmds->fileinfo.lineno = 0;
Note:
See TracChangeset
for help on using the changeset viewer.