Skip to content

Stream cache buffer not used completely (causing extra read) #39

@ghnicolas

Description

@ghnicolas

Hello,
In file legato_stream.c, seems that following condition prevent from using the cached buffer completely (thus causing extra reads)
Line 111
// requested data is in the local cache
if((uint32_t)addr >= stream->cache.baseAddress &&
(uint32_t)addr - stream->cache.baseAddress + size < stream->cache.logicalSize)
Need to change for following ?
(uint32_t)addr - stream->cache.baseAddress + size <= stream->cache.logicalSize)

Also, I am using a 16k cache buffer. Sometimes when iterating in the function leStream_Read the variable stream->cache.baseAddress seems to have been reseted to 0 in the middle of a transfer which causes to reload from external memory at some point where the cache buffer should still be used. Didn't find out for now.

Regards
Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions