Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #90461 > unrolled thread
| Started by | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| First post | 2016-07-16 17:45 -0700 |
| Last post | 2016-07-22 16:52 -0700 |
| Articles | 20 on this page of 23 — 6 participants |
Back to article view | Back to comp.lang.c
Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-16 17:45 -0700
Re: Feedback for a malloc implementation Udyant Wig <udyant.wig@gmail.com> - 2016-07-17 12:22 +0530
Re: Feedback for a malloc implementation Udyant Wig <udyant.wig@gmail.com> - 2016-07-17 17:58 +0530
Re: Feedback for a malloc implementation BartC <bc@freeuk.com> - 2016-07-17 13:40 +0100
Re: Feedback for a malloc implementation Udyant Wig <udyant.wig@gmail.com> - 2016-07-17 23:06 +0530
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 13:40 -0700
Re: Feedback for a malloc implementation Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-17 00:30 -0700
Re: Feedback for a malloc implementation BartC <bc@freeuk.com> - 2016-07-17 10:54 +0100
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 04:36 -0700
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 04:31 -0700
Re: Feedback for a malloc implementation Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-17 11:40 -0700
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 13:41 -0700
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 07:02 -0700
Re: Feedback for a malloc implementation BartC <bc@freeuk.com> - 2016-07-17 20:38 +0100
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 13:44 -0700
Re: Feedback for a malloc implementation BartC <bc@freeuk.com> - 2016-07-17 22:19 +0100
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-17 18:08 -0700
Re: Feedback for a malloc implementation Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-18 09:40 -0700
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-18 10:48 -0700
Re: Feedback for a malloc implementation Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-20 08:45 -0700
Re: Feedback for a malloc implementation Keith Thompson <kst-u@mib.org> - 2016-07-20 09:28 -0700
Re: Feedback for a malloc implementation Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-21 18:25 -0700
Re: Feedback for a malloc implementation Aaditya Kalsi <aadityakalsi@gmail.com> - 2016-07-22 16:52 -0700
Page 1 of 2 [1] 2 Next page →
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-16 17:45 -0700 |
| Subject | Feedback for a malloc implementation |
| Message-ID | <53ccbf4e-2d12-4d86-9af1-9062ff002f9c@googlegroups.com> |
Hello, I have written a new implementation of malloc() and free() and sibling APIs after studying dlmalloc and other prior art. I have written it with the goals: 1. Easy to read and maintain. 2. Be more memory conserving. 3. High efficiency and good performance. 4. Portability. I have a (I believe) working version with some tests and documentation and am hoping for some feedback on design and implementation as well as any other constructive feedback. Link to source: https://github.com/akalsi87/akmalloc Link to documentation: https://rawgit.com/akalsi87/akmalloc/1.0.1/_layouts/index.html The library is modeled close to dlmalloc because of its customizability but in doing so I have tried to not obfuscate too much with macros. Aaditya
[toc] | [next] | [standalone]
| From | Udyant Wig <udyant.wig@gmail.com> |
|---|---|
| Date | 2016-07-17 12:22 +0530 |
| Message-ID | <nmf9vi$co2$1@dont-email.me> |
| In reply to | #90461 |
[Could not decode multipart message] — view raw
This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --TRKJWbsIjBnB6T2OI4c7KhRFvER49qWSL Content-Type: application/pgp-encrypted Content-Description: PGP/MIME version identification Version: 1 --TRKJWbsIjBnB6T2OI4c7KhRFvER49qWSL Content-Type: application/octet-stream; name="encrypted.asc" Content-Description: OpenPGP encrypted message Content-Disposition: inline; filename="encrypted.asc" -----BEGIN PGP MESSAGE----- Version: GnuPG v2 hQIMA9Y6JG92+/q0AQ/7BiYAHKwDTedt7rBMJom5a5GEK3sZtxhk9CApA01K3Jj2 3w2sq00O77lIbwKJsnTePTsF5atRMx1wyOdSJXmfLHO8VkmVGGhEGjhMkdWaafpS loSNUg7ZOKLmstcBIFLgKWt+pPrnQ+702xcmw5oNAVp/SkPTMLdzlzMxfCnKl8d0 /lZX2SXmnHBK8V5NFvMrV+ygJod9n22feBeMFfFabug3ukI+WU761s1+T89o/ZJf Wos878hQQRpQwEkyp1TBTymp62XU3L4D3Zf6NxzBGK2pKD6dvQCUpChfUu3jWr7m hgHPpF8DCByzTfMwkqhJHQzFyLVKJv0cFU8YW2kmEvn30UIdAzU1xr23hXm1oldH 5Tt6U2COn9BwEGsqVRQcr7lBV5E5VpCXsGo63rFuGkj/HXSKn6wINhDQ3JVXLvkc KR3gXSfp/YqoOgGAILUbBJr4MzJ6kFHxvO/uUvsDs598ytffFrxjDgLLbFhWEhyR eTURDZj44IrXQn5lH+Kc37Gmxmx7EuvFS96CpJKe/MQpDJfi6+iTtElxGeERsOSl pUa87HkBN9veTfjULV3XKrm8SMFYptj7qSD9FrYu/pi76r6lVHchc+HJMrIM5K0X KQodMGwYSgr8iwyQ8KDkzemlULhBCAzst2iWiL6GR4PF319FyPinHbc/FQWJkaXS 7AGOxM6Z7RA/d4sQQ1m+p1j+rBJVHQ+3MsBJPaMQv1Q8CZABdVQFagyBTmVC7t4f LX0ylMO7NRnKFPF4vscggFZlqZE+VvFjug49JqJwM8YQx8BGM0Wkp5jNGlFBGJP7 WE22Ywqf2qeFm36hDYxHdtgzChRj33XdjAal1ZiIPV3qic7Ni2CUGMcJm9dEuw3k bH5/GFgtGjAr3p04HD3iyAJMYzNn20ZE1+l6wf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qkXXHsiYF8nYgGtRuVwT0UFwPCD2siEahb630O4ke3GgPOekw1X8kC+++BeJWl ywCKmyuRbkAhMsKr4Jl9bZ2V8mR+h12mijMtKEIyxd7gcyddWW3CjsQBExsmmYoW mzMTM2c5KakMeYGznYkYqy1v8pUH0c5LJRnWneJrlbJaY7wx8xVWLlZkB1SJDDew 7gb4cHrN2OjsatTuA6LrjRd5v1FnrByhx3+67TWbJW51xPeZeif8a5ScoTmbjlXA vxESDdQSsia2J40vvm9NGKNoK/Vi8+Xh =yJug -----END PGP MESSAGE----- --TRKJWbsIjBnB6T2OI4c7KhRFvER49qWSL--
[toc] | [prev] | [next] | [standalone]
| From | Udyant Wig <udyant.wig@gmail.com> |
|---|---|
| Date | 2016-07-17 17:58 +0530 |
| Message-ID | <nmftlk$4rq$1@dont-email.me> |
| In reply to | #90464 |
[Could not decode multipart message] — view raw
This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --6IdN8Suwpcv72vHmUV1xRwN9PU3oCqqSS Content-Type: application/pgp-encrypted Content-Description: PGP/MIME version identification Version: 1 --6IdN8Suwpcv72vHmUV1xRwN9PU3oCqqSS Content-Type: application/octet-stream; name="encrypted.asc" Content-Description: OpenPGP encrypted message Content-Disposition: inline; filename="encrypted.asc" -----BEGIN PGP MESSAGE----- Version: GnuPG v2 hQIMA9Y6JG92+/q0AQ/9Fk/e0XpXTKFm/qDjQMgpEJ0qh0y3/2IgdtNqNz6YXo6C xifOvcAfAeHvzbyoeNDPNj+XTh7tXn2kYfotacAxKuz7vPietqiznuGEcY1bIX36 EI0q+ssU3VfZZN/n0YdlNLxIKxJ16F/BJEyud/6Fh5dkesqRJPbwdqNIQ+FSkHfM 10ZlOV0e94GEVxsnCsx1+yHxW9Z0KT/GSuagocbd8O1HazSDQV30cN900KvtHWH7 FeZmkMvowfWnA1xeOifNAIdqiiLvXKXXcpDrGZ8lIemf3r9330JXo/cJQTvc1wOn Yq5r3JWPNYhco/MFa04sab6tXahlBHRh6pXzKZ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33FuiQil3XWWJ1Mz14Peiw9K1kqDykIMTG4n8qyucG1mOem 1/UhAbVS1pJZw9NOGDLl3fWfzN5cInaBADcuwgfnp3hNIIz1OSUDqQ8ZidDT+fXG G+oyylEkqIakspLybbJBio3N8/P99drl58+bLfZTF7nVgzVjvc6BO00PzI26fGbl mjk+5i+ZbIX0saLnv2WHinIL+qgltR3SN4Uc/pcxyL5+IG8ZBEwH3dfK0pE8jdyO Q9PB1LF7t26cAAfzZkNxahRx8ihYnGgsxRB99QAhEYB3j9ApPSRCoXD5UyBf57ZO KHlMxRHMUKpkm8fQXtZ7+SyYmY6RDKamqxLo5duhOaBSSXk5KIJxX+MHwovyLwuX oQOFezpL8cZoX/vXpoE2PohwvHybirVphoF+JiOwIOs5h+r1HX1spOwi7w86OqgP eF8uWBwhJsOUQKnAC6lzYSHAv+cP8aqVvmOMmw6+L2iiNjIYc9TLDqRJDOKELVtw B3mUtWsq0QzzqZS3ffnmz/AZH+BKTVDBtCOVwjTN2VY1ilP80RrrQmhZUOZxYFwL I+75S3H/O5zoxb6gz0L4/bQjGr3tTuYBjiFoaLCm77vcA0vnOqRzE9T7gU4hLkuz zdVVcotJHkR5B6BPI5qQ93WO0qZ4bI0SkaK3U0CG91vu247amc6kKQBxeQta2J1L ludQuY+rTtKBK8g3j03mGnFmQqgRgyrl+GBGWxZQEuHE9uIg5+fyQx0eoHjZJnU2 o+jEMt/LwWBLlrQSdJU/aYqZqGODlfw6pBk4S178cNehITek5gRmlsj/6Q9Jy3Pf JPFmHgpn8Bl8UF1511Y1thHIenZdKGhkwgXugSj20GvydcoxZwuXGeSCy/fv95tT 9BACSLXkkQUkBFFivjiudFk8D1ZdQg/SZhNS//jbsUWiiFF8yf2th5NSKGnTHBcQ sR/azo7MZoCcWuZWdyyyDqnu =EHVA -----END PGP MESSAGE----- --6IdN8Suwpcv72vHmUV1xRwN9PU3oCqqSS--
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-07-17 13:40 +0100 |
| Message-ID | <nmfuc4$71d$1@dont-email.me> |
| In reply to | #90471 |
On 17/07/2016 13:28, Udyant Wig wrote: > > This is an encrypted OpenPGP message. > In order to decrypt this mail, you need to install an OpenPGP add-on > <https://addons.mozilla.org/thunderbird/addon/enigmail/>. > > You message appears to be encrypted. When I tried to install the suggested add-on (a pita even if it had worked), it said "This add-on could not be installed because it could not be verified". While in google groups, your message hasn't (yet) appeared at all. (An earlier message of yours in this thread is also encrypted and also not on google groups. However other posts you've made in other threads have been fine.) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Udyant Wig <udyant.wig@gmail.com> |
|---|---|
| Date | 2016-07-17 23:06 +0530 |
| Message-ID | <nmgfn9$veu$1@dont-email.me> |
| In reply to | #90472 |
[There was an incident with a GPG key. The original article follows. Again.] On 07/17/2016 06:15 AM, Aaditya Kalsi wrote: > Hello, > > I have written a new implementation of malloc() and free() and sibling > APIs after studying dlmalloc and other prior art. Excellent. > I have written it with the goals: > > 1. Easy to read and maintain. A good goal. > 2. Be more memory conserving. As compared with dlmalloc()? > 3. High efficiency and good performance. As compared with dlmalloc()? > 4. Portability. Have you written to conform to a standard such as POSIX, then? That can ensure maximum portability. > I have a (I believe) working version with some tests and documentation > and am hoping for some feedback on design and implementation as well > as any other constructive feedback. > > Link to source: > https://github.com/akalsi87/akmalloc > > Link to documentation: > https://rawgit.com/akalsi87/akmalloc/1.0.1/_layouts/index.html > > The library is modeled close to dlmalloc because of its > customizability but in doing so I have tried to not obfuscate too much > with macros. A commendable effort. How about a README in the git repository so that it shows up on GitHub? Something brief would do fine. > Aaditya -- Udyant Wig
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 13:40 -0700 |
| Message-ID | <46f1ab51-66fa-41bb-bd93-9ed00380c194@googlegroups.com> |
| In reply to | #90476 |
On Sunday, July 17, 2016 at 1:36:51 PM UTC-4, Udyant Wig wrote: > [There was an incident with a GPG key. The original article follows. > Again.] > > On 07/17/2016 06:15 AM, Aaditya Kalsi wrote: > > Hello, > > > > I have written a new implementation of malloc() and free() and sibling > > APIs after studying dlmalloc and other prior art. > > Excellent. > > > I have written it with the goals: > > > > 1. Easy to read and maintain. > > A good goal. > > > 2. Be more memory conserving. > > As compared with dlmalloc()? Yes. I have been comparing against dlmalloc. > > 3. High efficiency and good performance. > > As compared with dlmalloc()? Yes, again, as compared to dlmalloc, and other implementations of malloc()/free(). I do not intend to compete with tcmalloc/jemalloc and other variants simply because those are optimized for multi-threaded speed at the cost of memory use. > > 4. Portability. > > Have you written to conform to a standard such as POSIX, then? That > can ensure maximum portability. I believe this conforms to POSIX. > > I have a (I believe) working version with some tests and documentation > > and am hoping for some feedback on design and implementation as well > > as any other constructive feedback. > > > > Link to source: > > https://github.com/akalsi87/akmalloc > > > > Link to documentation: > > https://rawgit.com/akalsi87/akmalloc/1.0.1/_layouts/index.html > > > > The library is modeled close to dlmalloc because of its > > customizability but in doing so I have tried to not obfuscate too much > > with macros. > > A commendable effort. How about a README in the git repository so > that it shows up on GitHub? Something brief would do fine. > > > Aaditya Thank you. I will work on adding this soon. > -- > Udyant Wig
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2016-07-17 00:30 -0700 |
| Message-ID | <cc9fb427-cec5-42d2-8bea-e4c013a0fdfe@googlegroups.com> |
| In reply to | #90461 |
On Sunday, July 17, 2016 at 1:45:41 AM UTC+1, Aaditya Kalsi wrote: > Hello, > > I have written a new implementation of malloc() and free() and > sibling APIs after studying dlmalloc and other prior art. > > I have written it with the goals: > > 1. Easy to read and maintain. > 2. Be more memory conserving. > 3. High efficiency and good performance. > 4. Portability. > > I have a (I believe) working version with some tests and documentation > and am hoping for some feedback on design and implementation as well > as any other constructive feedback. > > Link to source: > https://github.com/akalsi87/akmalloc > > Link to documentation: > https://rawgit.com/akalsi87/akmalloc/1.0.1/_layouts/index.html > > The library is modeled close to dlmalloc because of its customizability > but in doing so I have tried to not obfuscate too much with macros. > The code will be far more useful if you can package it as one source file and one associated header, the exports only the symbols ak_malloc(), ak_realloc(), ak_free(), maybe ak_malloc_usable_size(). The there's far too much Chinese box programming. ak_malloc should itself do most of the work. And you don't need to typedef anything except a few basic structures.
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-07-17 10:54 +0100 |
| Message-ID | <nmfkkk$9gn$1@dont-email.me> |
| In reply to | #90465 |
On 17/07/2016 08:30, Malcolm McLean wrote: > On Sunday, July 17, 2016 at 1:45:41 AM UTC+1, Aaditya Kalsi wrote: >> I have written a new implementation of malloc() and free() and >> I have written it with the goals: >> >> 1. Easy to read and maintain. >> 2. Be more memory conserving. >> 3. High efficiency and good performance. >> 4. Portability. >> >> I have a (I believe) working version with some tests and documentation >> and am hoping for some feedback on design and implementation as well >> as any other constructive feedback. >> >> Link to source: >> https://github.com/akalsi87/akmalloc >> >> Link to documentation: >> https://rawgit.com/akalsi87/akmalloc/1.0.1/_layouts/index.html >> >> The library is modeled close to dlmalloc because of its customizability >> but in doing so I have tried to not obfuscate too much with macros. >> > The code will be far more useful if you can package it as one source > file and one associated header, I agree. It took me a couple of minutes' browsing every directory to find the C source files. But there are also many, many more .js files, .html, .png, .cpp, cmake, .yml, even a .py file. What is someone supposed to do with all those? There also appears to be a dependency on Cmake, whatever that is. So it seems to fail on point one: >> 1. Easy to read and maintain. As you say, a simple library might comprise: akmalloc.h akmalloc.c plus a couple of documentation files. Looking at more files, there appear to be some bash scripts, which doesn't bode well. What is someone to do with /those/, if they are running Windows for example? What does the build process do, what does it produce? Is it a .lib, .so, .dll, or .obj? The only .c test program I could find seemed to be for Unix. I wonder if most of this stuff is auto-generated by the OP's development system? -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 04:36 -0700 |
| Message-ID | <9bd095e7-6a00-4f34-a3e6-072c910091a3@googlegroups.com> |
| In reply to | #90466 |
On Sunday, July 17, 2016 at 5:54:36 AM UTC-4, Bart wrote: > I agree. It took me a couple of minutes' browsing every directory to > find the C source files. But there are also many, many more .js files, > .html, .png, .cpp, cmake, .yml, even a .py file. What is someone > supposed to do with all those? There also appears to be a dependency on > Cmake, whatever that is. > > So it seems to fail on point one: > > >> 1. Easy to read and maintain. All the extraneous files mentioned are for documentation and CMake (which is a meta build system, https://www.cmake.org/). > As you say, a simple library might comprise: > > akmalloc.h > akmalloc.c > > plus a couple of documentation files. > Agreed. I'm trying to get such a version and see how it looks and how it will work. > Looking at more files, there appear to be some bash scripts, which > doesn't bode well. What is someone to do with /those/, if they are > running Windows for example? Those are internal development tools. > What does the build process do, what does it produce? Is it a .lib, .so, > .dll, or .obj? The only .c test program I could find seemed to be for Unix. It produces a .lib + .dll on Windows and a .so on Linux if AKMALLOC_LIBRARY=1 when building. It produces a .a when AKMALLOC_LINK_STATIC=1. It currently produces configured headers if AKAMLLOC_INCLUDE_ONLY=1 when building. The build script is in bash but a CMake user simply needs CMake and the source. > I wonder if most of this stuff is auto-generated by the OP's development > system? The documentation files (js, css, html, etc.) are produced by running doxygen on the source. > -- > Bartc
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 04:31 -0700 |
| Message-ID | <b6b4eee8-ab49-48b0-9431-b9a7dcb52285@googlegroups.com> |
| In reply to | #90465 |
On Sunday, July 17, 2016 at 3:30:25 AM UTC-4, Malcolm McLean wrote: > The code will be far more useful if you can package it as one source > file and one associated header, the exports only the symbols ak_malloc(), > ak_realloc(), ak_free(), maybe ak_malloc_usable_size(). I see. I am trying to cobble a version together which only has a header and source file. I can gather the documentation from the doc/ folder and put that in line with the source code. > The there's far too much Chinese box programming. ak_malloc should > itself do most of the work. I didn't quite understand the term. > And you don't need to typedef anything > except a few basic structures. Agreed. I can lose a few unnecessary typedefs.
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2016-07-17 11:40 -0700 |
| Message-ID | <2d6e2acb-e69c-4d9f-8a27-7d52165e15e0@googlegroups.com> |
| In reply to | #90469 |
On Sunday, July 17, 2016 at 12:31:43 PM UTC+1, Aaditya Kalsi wrote: > On Sunday, July 17, 2016 at 3:30:25 AM UTC-4, Malcolm McLean wrote: > > > The there's far too much Chinese box programming. ak_malloc should > > itself do most of the work. > > I didn't quite understand the term. > A Chinese Box (or Russian doll) is a series of boxes nested inside each other. The recipient opens the box, expecting a present, and inside there's just another box. Then another. Eventually the last box may contain a tiny gift, or sometimes it contain nothing. The same thing in programming is where you wrap something more than once. It's often useful to have a layer of abstraction between a raw void * and your return from mymalloc(), or an int and your memory size argument. But another layer of abstraction between the abstraction and the user's source is less useful. Abstraction of abstraction is Chinese Box programming.
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 13:41 -0700 |
| Message-ID | <a0b214ec-4e73-498a-a36c-dd8b9c33ff3f@googlegroups.com> |
| In reply to | #90479 |
On Sunday, July 17, 2016 at 2:40:47 PM UTC-4, Malcolm McLean wrote: > On Sunday, July 17, 2016 at 12:31:43 PM UTC+1, Aaditya Kalsi wrote: > > On Sunday, July 17, 2016 at 3:30:25 AM UTC-4, Malcolm McLean wrote: > > > > > The there's far too much Chinese box programming. ak_malloc should > > > itself do most of the work. > > > > I didn't quite understand the term. > > > A Chinese Box (or Russian doll) is a series of boxes nested inside > each other. The recipient opens the box, expecting a present, and > inside there's just another box. Then another. Eventually the last box > may contain a tiny gift, or sometimes it contain nothing. > > The same thing in programming is where you wrap something more than > once. It's often useful to have a layer of abstraction between > a raw void * and your return from mymalloc(), or an int and your > memory size argument. But another layer of abstraction between > the abstraction and the user's source is less useful. Abstraction > of abstraction is Chinese Box programming. I now understand the reference and why it was appropriate.
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 07:02 -0700 |
| Message-ID | <ecc6e5ec-a0a9-44ee-bf44-f55c9f583c98@googlegroups.com> |
| In reply to | #90461 |
I have a simplified version of the library based on the feedback here: https://github.com/akalsi87/akmalloc/tree/single-file It has a single .c and a single .h file. The .h file includes the .c file if AKMALLOC_INCLUDE_ONLY is defined. I hope this makes it easier to peruse through the code. Aaditya
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-07-17 20:38 +0100 |
| Message-ID | <nmgmr4$po8$1@dont-email.me> |
| In reply to | #90475 |
On 17/07/2016 15:02, Aaditya Kalsi wrote:
> I have a simplified version of the library based on the feedback here:
>
> https://github.com/akalsi87/akmalloc/tree/single-file
>
> It has a single .c and a single .h file. The .h file includes the .c file if AKMALLOC_INCLUDE_ONLY is defined.
That's a lot better. It seems to work, and some tests results I got are
below.
As I used it:
* I compiled akmalloc.c (I had to define AKMALLOC_LINK_STATIC, and
change the include path for "akmalloc.h" as my set-up was different)
* I compiled my test application as normal
* The akmalloc object file was statically linked into applicaton
Somehow, simply linking in akmalloc takes over the normal malloc() and
free() calls (the only ones I tested). So no changes are needed in
applications.
I tested using the 'binary tree' benchmark. The version I used is here:
http://pastebin.com/9FA3J76b (I lost my native C version; this is
auto-generated C.)
Tests were done on Windows with several C compilers and compared with
normal malloc/free library versions:
32- 64-bit
Pelles C 1.0 0.8 seconds; default malloc/free
lccwin 1.7 1.2
Digital Mars 0.9 ---
gcc/TDM 1.9 1.1
Clang --- 1.1
Tiny C 2.2 1.4
gcc/TDM 1.3 1.3 With AK malloc/free
Clang --- 1.4 With AK
Note this benchmark allocates and frees large numbers of the same size
block (12 bytes or 20/24 bytes). Also, on Windows, I believe the
OS-provided C runtime library (MSVCRT) is used by gcc, which is not fast.
(I haven't looked at the details of the source code.)
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 13:44 -0700 |
| Message-ID | <58b93c00-e82e-4f1a-b337-9746bcdf6187@googlegroups.com> |
| In reply to | #90481 |
On Sunday, July 17, 2016 at 3:38:20 PM UTC-4, Bart wrote: > On 17/07/2016 15:02, Aaditya Kalsi wrote: > > I have a simplified version of the library based on the feedback here: > > > > https://github.com/akalsi87/akmalloc/tree/single-file > > > > It has a single .c and a single .h file. The .h file includes the .c file if AKMALLOC_INCLUDE_ONLY is defined. > > That's a lot better. It seems to work, and some tests results I got are > below. > > As I used it: > > * I compiled akmalloc.c (I had to define AKMALLOC_LINK_STATIC, and > change the include path for "akmalloc.h" as my set-up was different) > > * I compiled my test application as normal > > * The akmalloc object file was statically linked into applicaton > > Somehow, simply linking in akmalloc takes over the normal malloc() and > free() calls (the only ones I tested). So no changes are needed in > applications. > > I tested using the 'binary tree' benchmark. The version I used is here: > http://pastebin.com/9FA3J76b (I lost my native C version; this is > auto-generated C.) > > Tests were done on Windows with several C compilers and compared with > normal malloc/free library versions: > > 32- 64-bit > > Pelles C 1.0 0.8 seconds; default malloc/free > lccwin 1.7 1.2 > Digital Mars 0.9 --- > gcc/TDM 1.9 1.1 > Clang --- 1.1 > Tiny C 2.2 1.4 > > gcc/TDM 1.3 1.3 With AK malloc/free > Clang --- 1.4 With AK > > Note this benchmark allocates and frees large numbers of the same size > block (12 bytes or 20/24 bytes). Also, on Windows, I believe the > OS-provided C runtime library (MSVCRT) is used by gcc, which is not fast. > > (I haven't looked at the details of the source code.) > > -- > Bartc Thank you for the excellent comparison and the source of the test. I compiled it and compared it on my MacOS machine and it turns out to be 2x faster with AKMALLOC_USE_LOCKS and almost 3.5-4x faster with no locks (no locks is slightly unfair because default malloc/free cannot do that). I was wondering if you also defined NDEBUG, otherwise you may be seeing longer times with as asserts are enabled, and inline functions get turned into non inline on a debug build. Would you mind if I added the treebin code as a reference performance test in the suite I maintain?
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-07-17 22:19 +0100 |
| Message-ID | <nmgspp$e2t$1@dont-email.me> |
| In reply to | #90486 |
On 17/07/2016 21:44, Aaditya Kalsi wrote: > On Sunday, July 17, 2016 at 3:38:20 PM UTC-4, Bart wrote: >> I tested using the 'binary tree' benchmark. The version I used is here: >> http://pastebin.com/9FA3J76b (I lost my native C version; this is >> auto-generated C.) > Would you mind if I added the treebin code as a reference performance test in the suite I maintain? You can do but there are better versions in 'proper' C. Here's a couple: http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&lang=gcc&id=5 http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&lang=gcc&id=1 (These take input N from the command line.) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-17 18:08 -0700 |
| Message-ID | <0c45ca68-7e9a-44f6-a6d1-2d02fc9ebb4b@googlegroups.com> |
| In reply to | #90488 |
On Sunday, July 17, 2016 at 5:20:01 PM UTC-4, Bart wrote: > On 17/07/2016 21:44, Aaditya Kalsi wrote: > > On Sunday, July 17, 2016 at 3:38:20 PM UTC-4, Bart wrote: > > >> I tested using the 'binary tree' benchmark. The version I used is here: > >> http://pastebin.com/9FA3J76b (I lost my native C version; this is > >> auto-generated C.) > > > Would you mind if I added the treebin code as a reference performance test in the suite I maintain? > > You can do but there are better versions in 'proper' C. Here's a couple: > > http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&lang=gcc&id=5 > > http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&lang=gcc&id=1 > > (These take input N from the command line.) Thank you. > -- > Bartc
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2016-07-18 09:40 -0700 |
| Message-ID | <kfnr3aqyk5d.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #90475 |
Aaditya Kalsi <aadityakalsi@gmail.com> writes: > I have a simplified version of the library based on the feedback here: > > https://github.com/akalsi87/akmalloc/tree/single-file > > It has a single .c and a single .h file. The .h file includes the .c > file if AKMALLOC_INCLUDE_ONLY is defined. > > I hope this makes it easier to peruse through the code. I have some other comments to make, but let me start off with just a few. I had no problem with the repository having lots of other files. I found the .[hc] files with no problem (isn't that what 'find' is for anyway?). It's okay to give a url that can be used with 'git clone'. The original url upthread presented no problem, but the "single file" url above fails that test. Giving a url intended for use in a browser /in addition to/ a url that can be used with wget or git clone is fine, but not by itself. When asking for a review, it's important to give a reference (eg, url) to something that is fixed, and will not change over time. Please figure out how to freeze a particular version and give a url to that. Giving a url to the time-varying version /in addition/ is fine, but there should be a frozen version given as the primary one. (And it's always possible to give a url for a later frozen version in a followup posting.) It's very annoying in discussions like this to be forced to try to hit a moving target. I was disappointed to discover that your project needs a newer version of cmake than I had installed, especially since I did an 'apt-get install cmake' less than two weeks ago! Any chance you can change the level of 'cmake' required to be a bit lower? (I don't remember what version of cmake was reported when I tried building your project.) I expect to have more to say, about the code and about the single/multi file choice, after you have a chance to respond to the above.
[toc] | [prev] | [next] | [standalone]
| From | Aaditya Kalsi <aadityakalsi@gmail.com> |
|---|---|
| Date | 2016-07-18 10:48 -0700 |
| Message-ID | <a1e76813-e6be-4914-af4a-9247c69c895b@googlegroups.com> |
| In reply to | #90517 |
On Monday, July 18, 2016 at 12:40:41 PM UTC-4, Tim Rentsch wrote: > Aaditya Kalsi <aadityakalsi@gmail.com> writes: > > > I have a simplified version of the library based on the feedback here: > > > > https://github.com/akalsi87/akmalloc/tree/single-file > > > > It has a single .c and a single .h file. The .h file includes the .c > > file if AKMALLOC_INCLUDE_ONLY is defined. > > > > I hope this makes it easier to peruse through the code. > > I have some other comments to make, but let me start off > with just a few. > > I had no problem with the repository having lots of > other files. I found the .[hc] files with no problem > (isn't that what 'find' is for anyway?). Agreed. I believe it to be very useful for debugging, testing and modularity. As for distribution, I feel there are valid concerns in both camps, so I decided to add and maintain a single-file branch also. > It's okay to give a url that can be used with 'git clone'. The > original url upthread presented no problem, but the "single file" > url above fails that test. Giving a url intended for use in a > browser /in addition to/ a url that can be used with wget or > git clone is fine, but not by itself. > > When asking for a review, it's important to give a reference > (eg, url) to something that is fixed, and will not change > over time. Please figure out how to freeze a particular > version and give a url to that. Giving a url to the > time-varying version /in addition/ is fine, but there should > be a frozen version given as the primary one. (And it's > always possible to give a url for a later frozen version in > a followup posting.) It's very annoying in discussions like > this to be forced to try to hit a moving target. I apologize for that. The single-file link was meant to be a /browser only/ link. Let me re-specify the links: % git clone https://github.com/akalsi87/akmalloc % git checkout [1.0.1 | single-file | develop] The develop branch is the "bleeding-edge" branch. The single-file branch is the default distribution branch (fixed). The 1.0.1 branch is the developer branch for the first release (fixed). > I was disappointed to discover that your project needs a > newer version of cmake than I had installed, especially > since I did an 'apt-get install cmake' less than two weeks > ago! Any chance you can change the level of 'cmake' required > to be a bit lower? (I don't remember what version of cmake > was reported when I tried building your project.) That's unfortunate! I looked through the CMake files and I don't believe I can reduce the required version. I do not remember what feature I used for my CMake project helper file that bumped it up to v3 but I have relied on it since a while. However, I don't believe you need CMake unless you plan to build a shared library. I use CMake to run tests and build tests against all configurations. Unless you plan to use the tests in the repository, you could do without it. I could also suggest simply commenting out those lines to see if it works without that minimum version. I believe it might. I don't have an older CMake at hand at the moment so I cannot test this. Sorry! > I expect to have more to say, about the code and about > the single/multi file choice, after you have a chance > to respond to the above.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2016-07-20 08:45 -0700 |
| Message-ID | <kfnlh0wuxd1.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #90528 |
Aaditya Kalsi <aadityakalsi@gmail.com> writes:
> On Monday, July 18, 2016 at 12:40:41 PM UTC-4, Tim Rentsch wrote:
>> Aaditya Kalsi <aadityakalsi@gmail.com> writes:
>>
>>> I have a simplified version of the library based on the feedback here:
>>>
>>> https://github.com/akalsi87/akmalloc/tree/single-file
>>>
>>> It has a single .c and a single .h file. The .h file includes the .c
>>> file if AKMALLOC_INCLUDE_ONLY is defined.
>>>
>>> I hope this makes it easier to peruse through the code.
>>
>> I have some other comments to make, but let me start off
>> with just a few.
And once more... (some quoted parts omitted)
> As for distribution, I feel there are valid concerns in both camps,
> so I decided to add and maintain a single-file branch also.
See below for further comments.
>> It's okay to give a url that can be used with 'git clone'. The
>> original url upthread presented no problem, but the "single file"
>> url above fails that test. Giving a url intended for use in a
>> browser /in addition to/ a url that can be used with wget or
>> git clone is fine, but not by itself.
>>
>> When asking for a review, it's important to give a reference
>> (eg, url) to something that is fixed, and will not change
>> over time. Please figure out how to freeze a particular
>> version and give a url to that. Giving a url to the
>> time-varying version /in addition/ is fine, but there should
>> be a frozen version given as the primary one. (And it's
>> always possible to give a url for a later frozen version in
>> a followup posting.) It's very annoying in discussions like
>> this to be forced to try to hit a moving target.
>
> I apologize for that. The single-file link was meant to be a /browser
> only/ link.
Yeah. IMO no sane person reviews code in a web browser. xMMV.
> Let me re-specify the links:
>
> % git clone https://github.com/akalsi87/akmalloc
> % git checkout [1.0.1 | single-file | develop]
>
> The develop branch is the "bleeding-edge" branch.
>
> The single-file branch is the default distribution branch (fixed).
>
> The 1.0.1 branch is the developer branch for the first release (fixed).
Having separate branches for distribution and development
seems right. The single file stuff should be added to
any other branches (assuming you want there to be two
versions, about which more below).
>> I was disappointed to discover that your project needs a
>> newer version of cmake than I had installed, especially
>> since I did an 'apt-get install cmake' less than two weeks
>> ago! Any chance you can change the level of 'cmake' required
>> to be a bit lower? (I don't remember what version of cmake
>> was reported when I tried building your project.)
>
> That's unfortunate! I looked through the CMake files and I don't
> believe I can reduce the required version. I do not remember what
> feature I used for my CMake project helper file that bumped it up to
> v3 but I have relied on it since a while.
>
> However, I don't believe you need CMake unless you plan to build a
> shared library. I use CMake to run tests and build tests against all
> configurations.
If possible I routinely do a full build using what comes with
the download, for a variety of reasons. Actually I was able
to compile the code before, but I worry that I may have missed
some important configuration setting.
The good news is I downloaded a later version of cmake and built
it from source. Problem solved.
>> I expect to have more to say, about the code and about
>> the single/multi file choice, after you have a chance
>> to respond to the above.
I still expect to have more substantial comments on the code,
but first I need to do another round of reporting build
problems.
I followed your directions and checked out the distribution
branch. No problem running cmake. But then the make failed.
Here is the first error message (please excuse my wrapping the
long lines):
[ 21%] Building CXX object test/CMakeFiles/tMallocPerfRef.dir/tMallocPerf.cpp.o
In file included from /usr/include/c++/4.8/thread:35:0,
from /opt/software/git/akmalloc/test/tMallocPerf.cpp:307:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file
requires compiler and library support for the ISO\
C++ 2011 standard. This support is currently experimental, and must be
enabled with the -std=c++11 or -std=gnu++11 compi\
ler options.
#error This file requires compiler and library support for the \
^
I also tried checking out single-file. After that running cmake
failed:
CMake Error: The source directory "/opt/software/git/akmalloc" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Last (for now) but not least, a high-level comment on organization
and structure. It seems like you are going to a lot of effort to
allow the akmalloc code to be #include'd rather than separately
compiled. Having that flexibility is not worth the cost in
terms of code organization and readability. Embrace the single
file model, and dump the multi-file #include model. It isn't
just that the multi-file model raises technical difficulties
(which it does); it also elicits a bad reaction in the culture
of C developers. It will be much easier to get your stuff
accepted if it doesn't buck development community cultural norms
so strongly.
To say that another way, there needs to be some VERY compelling
reasons to adopt the multi-file #include model for what you're
doing. Unless there are such reasons, /and/ you can present
them in a way that persuade other people that they are sufficiently
compelling, then you should drop the multi-file #include approach
and go exclusively with the single-file model.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.c
csiph-web