Deutsch English Français Italiano |
<aul27jh5mpr74c00npt2837ko62f8os1v0@4ax.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Rosario19 <Ros@invalid.invalid> Newsgroups: comp.lang.c Subject: Re: realloc() - frequency, conditions, or experiences about relocation? Date: Tue, 18 Jun 2024 11:50:48 +0200 Organization: A noiseless patient Spider Lines: 18 Message-ID: <aul27jh5mpr74c00npt2837ko62f8os1v0@4ax.com> References: <v4ojs8$gvji$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Tue, 18 Jun 2024 11:50:42 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8447731d54af59021ed93362b9a23686"; logging-data="1368779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dhTeQQIAp/9KE6bpdABQNgoxjpliUT78=" Cancel-Lock: sha1:MwwTVKRZyXH6uMtZrQeB7vBWrUI= X-Newsreader: Forte Free Agent 1.93/32.576 English (American) Bytes: 1912 On Mon, 17 Jun 2024 08:08:07 +0200, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: >In a recent thread realloc() was a substantial part of the discussion. >"Occasionally" the increased data storage will be relocated along >with the previously stored data. On huge data sets that might be a >performance factor. Is there any experience or are there any concrete >factors about the conditions when this relocation happens? - I could >imagine that it's no issue as long as you're in some kB buffer range, >but if, say, we're using realloc() to substantially increase buffers >often it might be an issue to consider. It would be good to get some >feeling about that internal. > >Janis the only problem i see it is the memory that is free is the first has to be used, or be returned from malloc or realloc, because that memory is already in a good position near the cpu