Announcement

Collapse
No announcement yet.

Ubuntu Is Going After A New Linux Kernel API

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    Did anybody read this:
    Originally posted by Kayden View Post
    I'm surprised no one has mentioned this, yet...but based on the 30 second overview, this sounds a lot like the existing madvise() function. Programs can use that to tell the OS "If you're running low on memory, feel free to throw this away, and just give me zeroes later." It's existed on Linux since at least the 2.4 kernel, and also exists on BSD and MacOS X.
    Or has this turned into a discussion about GC vs. direct memory now?

    Comment


    • #77
      I think that the main difference is that the programmer has to make a constant check, like having a specific thread running which does a madvise call like every 20 seconds and sleeps in between.

      While here, it would be abstracted by the use of a (common) signal system, which I find to be more elegant.

      Comment


      • #78
        Originally posted by jayrulez View Post
        I've read that article a while back.

        It is not all black and white.

        You mentioned QML/C++ should make better use of memory. Remember QML is also garbage collected and QML currently introduces quite a bit of overhead (Should be reduced when they switch to the V4 engine).

        I would argue that C#/Mono would also fit well on mobile. In the same way that you can use C++ for performance critical code in C++/QML world, you can use C++ for the same in C#/Mono world (https://github.com/mono/cppsharp : Note this is not like traditional p/invoke). You can also optimize code by using SimD and inline assembly in Mono. You can also disable the GC for critical code segments (AFIK: this is not possible (yet) in QML).

        You could then compile the C# code to a native binary [ngen in windows, full aot in Mono] (bypassing the virtual machine and and any jitting). The only overhead in this case should come from garbage collection and whatever horrible code one might have written. This would put you in pretty much the same situation as C++/QML.

        I am not saying that C#/Mono is better than C++/QML [I actually prefer QML to anything else out there], but dismissing them as bad for devices based on generalizations made about GC'd languages is incredibly shortsighted.


        I'm not sure if this is a solved problem o feel free to point it out if it is. Using Qt/QML would introduce a lot of overhead for developers if developing for a platform the scale of android. This overhead would come from requiring a lot more testing (Native code is not equal on all ARM processors), increase in development time.

        Requiring multiple binaries to distribute for different ARM chips.
        C#/Mono would have the same problem when compiled to native binaries.
        I am not familiar with how compiled-to-native C#/Mono work, is it still GC'd? If they are, you still have the same problem. If not, it might be that you could use it, but I can't really see the advantage over regular C/C++. I use C# over .NET at work and I find it a pain to do even the most basic thing, especially of all the boilerplate you have to write. Sure, it has a brilliant object model, but being strongly typed is a big turn-off for me.

        I am not sure about the testing bit, but I don't think it should be any problem really. You have native code running on different x86, x64, Intel, AMD, whatever architectures running just fine. And ARM has matured enough by now that it can take most of the stuff (reference needed). I think what varies in an ARM SoC is not the CPU core itself, but all the stuff that you would normally find on a PC motherboard: connectivity, bridges, decoders, GPU, etc.

        Using Qt/QML would introduce a lot of overhead for developers if developing for a platform the scale of android
        What do you mean by that, why so?

        Comment


        • #79
          Originally posted by jayrulez View Post
          You mentioned QML/C++ should make better use of memory. Remember QML is also garbage collected and QML currently introduces quite a bit of overhead (Should be reduced when they switch to the V4 engine).
          That is only if you are using javascript for actual code. If you are just using QML, which is a way to describe the behavior of the UI, then it shouldn't make a big difference.

          Comment


          • #80
            Originally posted by matzipan View Post
            I am not familiar with how compiled-to-native C#/Mono work, is it still GC'd?
            Yes, it is. Just like you can run C or C++ programs with a GC if you want to. You can choose to use unsafe blocks in C# which turns off the GC, but that's pretty ugly and if you have to do that you're probably better off with another language anyway.

            I use C# over .NET at work and I find it a pain to do even the most basic thing, especially of all the boilerplate you have to write. Sure, it has a brilliant object model, but being strongly typed is a big turn-off for me.
            What boilerplate do you mean? There is the "var" type for those who don't like strong typing. And for those who don't, are there many languages that don't GC either?

            Comment

            Working...
            X