Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/30/20 in all areas

  1. Dave Nottage

    Thread programming without sleep or WaitFor events

    Then you should not be using UDP, since order of packets is not guaranteed. With UDP, every packet should be considered data independent of all others.
  2. Newly released FastMM5: https://github.com/pleriche/FastMM5 FastMM is a fast replacement memory manager for Embarcadero Delphi applications that scales well across multiple threads and CPU cores, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files. Version 5 is a complete rewrite of FastMM. It is designed from the ground up to simultaneously keep the strengths and address the shortcomings of version 4.992: Multithreaded scaling across multiple CPU cores is massively improved, without memory usage blowout. It can be configured to scale close to linearly for any number of CPU cores. In the Fastcode memory manager benchmark tool FastMM 5 scores 15% higher than FastMM 4.992 on the single threaded benchmarks, and 30% higher on the multithreaded benchmarks. (I7-8700K CPU, EnableMMX and AssumeMultithreaded options enabled.) It is fully configurable runtime. There is no need to change conditional defines and recompile to change options. (It is however backward compatible with many of the version 4 conditional defines.) Debug mode uses the same debug support library as version 4 (FastMM_FullDebugMode.dll) by default, but custom stack trace routines are also supported. Call FastMM_EnterDebugMode to switch to debug mode ("FullDebugMode") and call FastMM_ExitDebugMode to return to performance mode. Calls may be nested, in which case debug mode will be exited after the last FastMM_ExitDebugMode call. Supports 8, 16, 32 or 64 byte alignment of all blocks. Call FastMM_EnterMinimumAddressAlignment to request a minimum block alignment, and FastMM_ExitMinimumAddressAlignment to rescind a prior request. Calls may be nested, in which case the coarsest alignment request will be in effect. All event notifications (errors, memory leak messages, etc.) may be routed to the debugger (via OutputDebugString), a log file, the screen or any combination of the three. Messages are built using templates containing mail-merge tokens. Templates may be changed runtime to facilitate different layouts and/or translation into any language. Templates fully support Unicode, and the log file may be configured to be written in UTF-8 or UTF-16 format, with or without a BOM. It may be configured runtime to favour speed, memory usage efficiency or a blend of the two via the FastMM_SetOptimizationStrategy call. Experience/opinions welcome ...
  3. David Heffernan

    Thread programming without sleep or WaitFor events

    Regarding timers and energy use: https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  4. David Heffernan

    Thread programming without sleep or WaitFor events

    You asked the same question on SO: https://stackoverflow.com/questions/61505887/thread-programming-without-sleep-or-waitfor-events It was closed there because it lacked focus. You seem to be wanting advice to a level of detail that far outstrips the level of detail used to specify your problem, and your current solution. In my view you are unlikely to be anything much out of a question asked the way you did. I recommend that you step back and provide a lot more detail and background. That will give you more hope of getting relevant advice.
  5. Lars Fosdal

    XML to SVG

    Joe, I am all for open source. That said - open source does not necessarily equate free (in as not having a cost) to use. If someone spent a good deal of time on writing code for a specific purpose, and there is a market for that code, I see no problem with asking for a monetary contribution for somebody else to use that code. Buying it is a voluntary action. Of course, people will only buy it if it adds value over any "free" competitors. As for the cost: For an individual developer, the cost may seem steep. If we are not swimming in cash from our own product, it is hard to defend spending cash buying code. From a corporate perspective, it is cheap since the ISV takes responsibility for dealing with bug reports and feature requests. We happily pay ISVs like Eurekalog, TMS, and others because their products have value to us. They solve a problem and save us time. If this SVG lib does that for somebody, it is worth the money for them.
  6. Dale M

    Capturing Console Output

    https://github.com/TurboPack/DOSCommand Never used it, but this is probably the one you are thinking of since it is available via GetIt. So you're not crazy. Well...maybe if you use GetIt... 😀
  7. David Heffernan

    Capturing Console Output

    https://stackoverflow.com/q/19054789/505088
  8. Remy Lebeau

    Thread programming without sleep or WaitFor events

    Or Registered I/O.
  9. Dave Nottage

    Setting a "nullable" property on a .NET object

    I've posted a new question after help from Olivier: https://stackoverflow.com/questions/61514990/setting-an-enum-property-on-a-net-object If anyone can help, it would be greatly appreciated.
  10. Anders Melander

    Thread programming without sleep or WaitFor events

    Unless you're running on a Commodore 64 you shouldn't be seeing such delays due to Sleep or WaitForSingleObject. There must be something else affecting the result but it's hard to tell without seeing your source. How many threads do you have running concurrently? Anyway, IO Completion Ports are generally considered the best way to get optimal performance in the scenario you describe. It should be fairly easy to find some examples of how to utilize them with Delphi. ...and don't mess with the thread affinity. Leave the thread scheduling to the OS. It's better at it and it shouldn't really be needed for something like this. P.S. Don't use Sleep(0).
  11. CarioJr

    Receiving incoming calls

    I tried in a device with android 4.4 and it works. But is very obsolet.
  12. Local variables that are un-managed types are not auto-initialized. Object pointers are managed types only on ARC platforms (iOS and Android). Strings are always managed types, integers are never managed types. Only global variables and class members that are un-managed types get auto-initialized to zeros.
×