Menu

uftpproxyd - static memory allocation

Andreas B.
2018-07-30
2018-08-06
  • Andreas B.

    Andreas B. - 2018-07-30

    Hi Dennis,

    I use uftproxyd 4.9.7 in an IoT environment on embedded systems with typically limited RAM.
    I have now discovered that the proxy allocates a lot of memory statically.
    The size tool lists a BSS size of ~62.2 MB for my platform (ARM Cortex A7):

    size uftpproxyd
       text    data     bss     dec     hex filename
     108725    1132 65284176    65394033    3e5d571 uftpproxyd
    

    This is probably due to the following definition of header uftp.h (line 276)

    #define MAXPROXYDEST 1000
    

    Is there a documentation for this define?
    How would a configuration look like if I only want to support
    two proxy servers and a maximum of 20 clients?

    Regards,
    Andreas

     
  • Dennis Bush

    Dennis Bush - 2018-08-05

    Andreas,

    There isn't any specific documentation for this #define, but what this value does it specify the maximum number of clients that a sngle proxy may support.

    In your case the number of supported clients is much smaller, so you can shrink this value to whatever value makes sense for you. For example, if you were to set it to 100, the BSS size would shrink to around 6MB.

    Regards,
    Dennis

     
    • Andreas B.

      Andreas B. - 2018-08-06

      Hi Dennis,

      Thanks for your reply. I've also tried a few values, which allowed me to reduce the BSS size considerably. For me it was still important to understand whether there might still be dependencies in the background and whether they had to be taken into account.

      If the value only corresponds to the number of clients, then that is OK for me and I will patch the code accordingly.

      Regards,
      Andreas

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.