On Tue, Feb 12, 2008 at 03:22:17PM -0500, Nicolas Pitre wrote:Freeing the data is not my problem. Many validations are in parse_XXX_buffer, which are also used by fsck. This returns a struct commit/tree/tag/blob. I have not found any code in git to free them. Same for pack-objects, e.g. add_objects_in_unpacked_packs allocates many struct object via lookup_unknown_object. As far as I understand the code, they are never freed, even if they are not needed later. It only loads all objects, it checks (eg. no objects from the pack file by default). After loading a object, it frees the content of object, but keeps the parsed information in memory for the connectivity check. So you propose the following: 1) run index-pack (write pack file + index in repository) 2) fsck pack file 3) update refs This looks to be very prone to race conditions, if multiple pushes run concurrently. To be on the safe side, the checks must be finished, before a pack/object becomes part of the repository. We must check the reachability before index-pack writes the index. In my opinion, separating the code for the reachability check from index-pack would complicate things. It would not safe memory, as the memory would be used by two processes instead of one. You don't want to increase the resource usage of index-pack. If --strict is not passed, I implemented this. For --strict, it is not avoidable, that index-pack will use more memory and cpu time. mfg Martin Kögler - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Matt Mackall | Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker.c compiling |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
git: | |
