A memory sharing method for at least a functional module and a target
module is disclosed. The functional module includes at least a static
random access memory (SRAM), the memory sharing method includes the steps
of calculating a memory capacity of the functional module; if a total
memory capacity of a module group satisfies a memory capacity requirement
of the target module, allocating the SRAM of the module group, wherein
the module group comprises at least one functional module; and accessing
the SRAM of the functional module of the module group by utilizing the
target module.