This paper deals with the problems of memory allocation and partitioning in hardware/software codesign. We present two algorithms to solve these problems. First a memory allocation algorithm for minimizing memory traffic is presented. The memory allocations are performed based upon data transfer profiling information captured with an extension to the Gnu C compiler. A partitioning algorithm is then presented which is used to partition the C/C++ specification into behavioural VHDL and object code, the partitioning algorithm decisions are based upon information from memory allocation, execution profiling and hardware estimations. The partitioning process is made interactive by allowing the user to control how a specific object should be implemented. We present results from two examples: One calculating the Fibonacchi numbers and one implementing the operation and maintenance functionality of the ATM protocol. We observe that taking data transfer information into account can lead to 50% performance improvement.