Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #17193
| From | "Rod Pemberton" <do_not_have@notemailnotz.cnm> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Buddy System Memory Allocator |
| Date | 2012-11-09 02:20 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k7iakp$gpm$1@speranza.aioe.org> (permalink) |
| References | <yZzls.238791$it2.2729@fx22.am4> <k792o8$c4l$1@speranza.aioe.org><WWpms.216705$Tf3.28710@fx12.am4><1b12d69b-ae6e-4a1a-821a-1badbb0100ed@k6g2000vbr.googlegroups.com><k7ev19$jgb$1@speranza.aioe.org> <7xhap0di7e.fsf@ruckus.brouhaha.com><k7f0qf$mpt$1@speranza.aioe.org> <7xa9us3mme.fsf@ruckus.brouhaha.com> |
"Paul Rubin" <no.email@nospam.invalid> wrote in message news:7xa9us3mme.fsf@ruckus.brouhaha.com... > "Rod Pemberton" <do_not_have@notemailnotz.cnm> writes: ... > > It's my understanding from what I've read that coding an operating > > system in C++ is very difficult, primarily because of new and delete. > > It's not difficult to code an OS in C. I.e., they are not equivalent. > > That makes no sense at all; Well, I've read that more than a few times from various sources. So, I'm assuming there is some truth to it. Someone coding an OS (operating system) in C++ must implement new and delete - custom to their OS. Perhaps, that's were the problem is. Personally, I've got no familiarity with new, delete, or an OS in C++, so it's possible it's a myth. But, I can't imagine why people would intentionally spread such a myth ... Who opposes using C++ for OS development? There are enough C++ programmers that I'm sure a few have tried. > [...] lots of OS's are coded in C++, [...] No offense, but I seriously doubt that. I wouldn't doubt that a few exist though. I've seen people attempt OSes in all sorts of languages. But, I've not come across a single OS on the Internet coded in C++. Nor do I recall anyone posting about using C++ for their OS to alt.os.development. C and the host's assembly still seem to be the predominant languages that OSes are coded in. I wouldn't doubt it that a "C++" OS is mostly coded in C with a bit of trivial C++ usage, just as many C++ programs aren't actually C++ either but C masquerading as C++. I can't imagine an OS developer wanting to deal with additional complexities within their OS, such as inheritance, object oriented programming, polymorphism, classes and overloading of C++. At some point, an OS developer coding in a HLL (high-level language) will likely create their own compiler, or attempt to bootstrap an existing compiler. The more complicated the compiler, the less likely it is that they'll succeed. Simplicity is needed initially. Complexity can be added at a later time. For my OS project, I really don't even want C. I want a very small C subset. Technically, even that is a bit more than I really want. If assemblers could manage variables like C, I'd probably use an assembler. Today, most are powerful enough that they can handle structures, control flow, macro's, procedures, etc. I.e., many are almost HLLs. > [...] and C++ is almost exactly a superset of C (that is, C programs > can be compiled and run under C++ with very little if any modification). Well, I've never coded C++. AIR (as I recall), C is a subset of C++. From what I've seen, "pure" C++ programs appear very different syntactically from C programs and C treated as C++. E.g., from Wikipedia's C++ page: 'std::cout << "..."' AIUI, std class, cout function, i.e., functionally equivalent to C's printf(). Clearly, that's not a 'superset' of C. That's purely C++. No C programmer recognizes that without being provided an explanation. A superset would extend the existing C functionality and syntax, e.g., printf::file. A C programmer would recognize printf and might be able to guess that '::file' makes printf function similar to fprintf. Rod Pemberton
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[OT] Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-04 20:10 +0000
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 15:05 -0800
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 22:02 -0800
Re: Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-10 12:53 +0000
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-10 20:25 -0500
Re: Buddy System Memory Allocator Josh Grams <josh@qualdan.com> - 2012-11-11 11:49 +0000
Re: Buddy System Memory Allocator Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-11 17:43 +0100
Re: Buddy System Memory Allocator Josh Grams <josh@qualdan.com> - 2012-11-12 01:55 +0000
Re: Buddy System Memory Allocator "Elizabeth D. Rather" <erather@forth.com> - 2012-11-11 07:06 -1000
Re: Buddy System Memory Allocator Alex McDonald <blog@rivadpm.com> - 2012-11-05 06:33 -0800
Re: Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-10 12:05 +0000
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-13 19:49 -0800
Re: [OT] Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-04 16:55 -0800
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 19:08 -0800
Re: [OT] Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-07 08:49 +0000
Re: [OT] Buddy System Memory Allocator Ron Aaron <rambamist@gmail.com> - 2012-11-05 08:17 +0200
Re: [OT] Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-07 09:02 +0000
Re: [OT] Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-05 14:10 -0500
Re: Buddy System Memory Allocator Alex McDonald <blog@rivadpm.com> - 2012-11-05 12:58 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-06 20:54 -0500
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-06 21:50 -0800
Re: Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-07 08:36 +0000
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 19:49 -0500
Re: Buddy System Memory Allocator Alex McDonald <blog@rivadpm.com> - 2012-11-08 04:42 -0800
Re: Buddy System Memory Allocator Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-08 19:43 -0800
Re: Buddy System Memory Allocator albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-09 10:48 +0000
Re: Buddy System Memory Allocator Bernd Paysan <bernd.paysan@gmx.de> - 2012-11-09 22:15 +0100
Re: Buddy System Memory Allocator Alex McDonald <blog@rivadpm.com> - 2012-11-07 12:46 -0800
Re: Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-10 13:09 +0000
Re: Buddy System Memory Allocator Alex McDonald <blog@rivadpm.com> - 2012-11-10 07:43 -0800
Re: [OT] Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-07 09:34 +0000
Re: Buddy System Memory Allocator Mark Wills <forthfreak@gmail.com> - 2012-11-07 04:07 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 19:44 -0500
Re: Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-07 16:57 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-07 20:14 -0500
Re: Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-07 17:32 -0800
Re: Buddy System Memory Allocator anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-08 12:32 +0000
Re: Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-08 20:00 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-09 02:20 -0500
Re: Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-09 00:53 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-09 19:10 -0500
Re: Buddy System Memory Allocator Paul Rubin <no.email@nospam.invalid> - 2012-11-09 18:47 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-10 02:16 -0500
Re: Buddy System Memory Allocator "Elizabeth D. Rather" <erather@forth.com> - 2012-11-09 17:51 -1000
Re: Buddy System Memory Allocator Mark Wills <forthfreak@gmail.com> - 2012-11-09 22:51 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-10 02:26 -0500
Re: Buddy System Memory Allocator "Elizabeth D. Rather" <erather@forth.com> - 2012-11-09 22:01 -1000
Re: Buddy System Memory Allocator Mark Wills <forthfreak@gmail.com> - 2012-11-09 22:49 -0800
Re: Buddy System Memory Allocator "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2012-11-10 02:15 -0500
Re: Buddy System Memory Allocator Mark Wills <forthfreak@gmail.com> - 2012-11-09 22:57 -0800
Re: Buddy System Memory Allocator Mark Wills <forthfreak@gmail.com> - 2012-11-08 00:22 -0800
Re: Buddy System Memory Allocator "Mark" <mark@dibsco.co.uk> - 2012-11-10 13:43 +0000
Re: [OT] Buddy System Memory Allocator Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 13:10 +0000
Re: [OT] Buddy System Memory Allocator Chris Hinsley <chris.hinsley@gmail.com> - 2012-11-07 13:31 +0000
Re: [OT] Buddy System Memory Allocator Charles Mélice <charles.melice@gmail.com> - 2012-11-11 05:29 -0800
csiph-web