A method of a flash memory controller, comprising:
- providing an interface circuit, coupled between a host and an internal bus;
- providing a control logic circuit, coupled between the internal bus and a flash memory module which is externally coupled to the flash memory controller, the flash memory module having a plurality of chips each comprising a plurality of pages each comprising a plurality of sectors;
- providing a cache coupled to the internal bus to buffer data corresponding to a plurality of sequential write commands;
- utilizing a processor to build or update a binary tree only when a data amount of data buffered in the cache exceeds data amount of a minimum writing unit within the flash memory module;
- in response to a read command from the host for certain data, utilizing the processor to search the binary tree to determine whether to access the flash memory module for the certain data;
- and
- after buffered data having the data amount of the minimum writing unit has been written to the flash memory module, utilizing the processor to delete one or more nodes from the binary tree without adding new nodes into the binary tree.