How to enter a string using DMA ,if we don't know the the length of string ?
Means user entering a long string in which he don't have any idea about length of string ?
There's no simple rule about this. IMHO the code author can generally allocate a reasonable amount of bytes in the beginning. The memory block can be resized on the event it no longer suffice the necessary buffer size. I once read (also in SL), that the common resize multiplier is 1.5; e.g. if you allocate 100 byte in the beginning, you resize the memory block by adding 150 (1.5% from the initial buffer size), you then have 250 bytes on the first resize. But again, there is no specific rule mandating this calculation, you may adapt as per your predictions or project requirement, as you see fit 👌