Changeset 2056 in kBuild for trunk/src/kmk/job.c
- Timestamp:
- Nov 4, 2008 3:25:19 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/job.c
r2001 r2056 944 944 } 945 945 946 #ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS 947 /* Free the chopped command lines for simple targets when 948 there are no more active references to them. */ 949 950 child->file->cmds->refs--; 951 if ( !child->file->intermediate 952 && !child->file->pat_variables 953 && child->file->cmds->refs == 0) 954 { 955 struct commands *cmds = child->file->cmds; 956 unsigned int i; 957 958 for (i = 0; i < cmds->ncommand_lines; ++i) 959 { 960 free (cmds->command_lines[i]); 961 cmds->command_lines[i] = 0; 962 } 963 free (cmds->command_lines); 964 cmds->command_lines = 0; 965 free (cmds->lines_flags); 966 cmds->lines_flags = 0; 967 cmds->ncommand_lines = 0; 968 } 969 #endif /* CONFIG_WITH_MEMORY_OPTIMIZATIONS */ 970 946 971 free (child); 947 972 } … … 1682 1707 /* Chop the commands up into lines if they aren't already. */ 1683 1708 chop_commands (cmds); 1709 #ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS 1710 cmds->refs++; /* retain the chopped lines. */ 1711 #endif 1684 1712 1685 1713 /* Expand the command lines and store the results in LINES. */
Note:
See TracChangeset
for help on using the changeset viewer.